You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

15 lines
496 B

import _version
with open('version.rc.template', 'r') as verstf:
verstemp = verstf.read()
major, minor, patch = _version.version.split(".")
verstemp = verstemp.replace("%APPNAME%", _version.appName)
verstemp = verstemp.replace("%VERSION%", _version.version)
verstemp = verstemp.replace("%MAJOR_VERSION%", major)
verstemp = verstemp.replace("%MINOR_VERSION%", minor)
verstemp = verstemp.replace("%PATCH_VERSION%", patch)
with open('version.rc', 'w') as versf:
versf.write(verstemp)