diff options
author | Remco Burema <r.burema@ultimaker.com> | 2022-09-23 18:49:50 +0300 |
---|---|---|
committer | Remco Burema <r.burema@ultimaker.com> | 2022-09-23 18:49:50 +0300 |
commit | a94bd91085afa99707ef5c6f5e2ff9fe709bf764 (patch) | |
tree | ce3a8009660659d1d9f6ca404394a23cd859cd69 | |
parent | 31e1577347947766fcec54ff5d9a155a00c8a20c (diff) |
Able to force 'prerelease'-version information.5.2.99
-rw-r--r-- | conanfile.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/conanfile.py b/conanfile.py index 17cd0260a6..327a571e54 100644 --- a/conanfile.py +++ b/conanfile.py @@ -35,6 +35,7 @@ class CuraConan(ConanFile): "devtools": [True, False], # FIXME: Split this up in testing and (development / build (pyinstaller) / system installer) tools "cloud_api_version": "ANY", "display_name": "ANY", # TODO: should this be an option?? + "extra_build_version": "ANY", #FIXME?: can't retrieve this from github workflow, so have an option to do it 'manually' "cura_debug_mode": [True, False], # FIXME: Use profiles "internal": [True, False] } @@ -44,6 +45,7 @@ class CuraConan(ConanFile): "devtools": False, "cloud_api_version": "1", "display_name": "Ultimaker Cura", + "extra_build_version": "", "cura_debug_mode": False, # Not yet implemented "internal": False, } @@ -150,9 +152,12 @@ class CuraConan(ConanFile): cura_version_py = Template(f.read()) cura_version = self.conf_info.get("user.cura:version", default = self.version, check_type = str) + version = Version(cura_version) + if self.options.extra_build_version != "": + version.prerelease = self.options.extra_build_version if self.options.internal: - version = Version(cura_version) - cura_version = f"{version.major}.{version.minor}.{version.patch}-{version.prerelease.replace('+', '+internal_')}" + version.prerelease = version.prerelease.replace('+', '+internal_') + cura_version = f"{version.major}.{version.minor}.{version.patch}-{version.prerelease}" with open(Path(location, "CuraVersion.py"), "w") as f: f.write(cura_version_py.render( |