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.

14 lines
496 B

  1. import _version
  2. with open('version.rc.template', 'r') as verstf:
  3. verstemp = verstf.read()
  4. major, minor, patch = _version.version.split(".")
  5. verstemp = verstemp.replace("%APPNAME%", _version.appName)
  6. verstemp = verstemp.replace("%VERSION%", _version.version)
  7. verstemp = verstemp.replace("%MAJOR_VERSION%", major)
  8. verstemp = verstemp.replace("%MINOR_VERSION%", minor)
  9. verstemp = verstemp.replace("%PATCH_VERSION%", patch)
  10. with open('version.rc', 'w') as versf:
  11. versf.write(verstemp)