mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-20 05:07:50 -06:00
Able to force 'prerelease'-version information.
This commit is contained in:
parent
31e1577347
commit
a94bd91085
1 changed files with 7 additions and 2 deletions
|
@ -35,6 +35,7 @@ class CuraConan(ConanFile):
|
||||||
"devtools": [True, False], # FIXME: Split this up in testing and (development / build (pyinstaller) / system installer) tools
|
"devtools": [True, False], # FIXME: Split this up in testing and (development / build (pyinstaller) / system installer) tools
|
||||||
"cloud_api_version": "ANY",
|
"cloud_api_version": "ANY",
|
||||||
"display_name": "ANY", # TODO: should this be an option??
|
"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
|
"cura_debug_mode": [True, False], # FIXME: Use profiles
|
||||||
"internal": [True, False]
|
"internal": [True, False]
|
||||||
}
|
}
|
||||||
|
@ -44,6 +45,7 @@ class CuraConan(ConanFile):
|
||||||
"devtools": False,
|
"devtools": False,
|
||||||
"cloud_api_version": "1",
|
"cloud_api_version": "1",
|
||||||
"display_name": "Ultimaker Cura",
|
"display_name": "Ultimaker Cura",
|
||||||
|
"extra_build_version": "",
|
||||||
"cura_debug_mode": False, # Not yet implemented
|
"cura_debug_mode": False, # Not yet implemented
|
||||||
"internal": False,
|
"internal": False,
|
||||||
}
|
}
|
||||||
|
@ -150,9 +152,12 @@ class CuraConan(ConanFile):
|
||||||
cura_version_py = Template(f.read())
|
cura_version_py = Template(f.read())
|
||||||
|
|
||||||
cura_version = self.conf_info.get("user.cura:version", default = self.version, check_type = str)
|
cura_version = self.conf_info.get("user.cura:version", default = self.version, check_type = str)
|
||||||
if self.options.internal:
|
|
||||||
version = Version(cura_version)
|
version = Version(cura_version)
|
||||||
cura_version = f"{version.major}.{version.minor}.{version.patch}-{version.prerelease.replace('+', '+internal_')}"
|
if self.options.extra_build_version != "":
|
||||||
|
version.prerelease = self.options.extra_build_version
|
||||||
|
if self.options.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:
|
with open(Path(location, "CuraVersion.py"), "w") as f:
|
||||||
f.write(cura_version_py.render(
|
f.write(cura_version_py.render(
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue