mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-24 07:03:56 -06:00
Fix reference to version properties that don't exist.
version.prerelease does not exist, swapped this out for version.pre. There is no "+" inside prerelease (ie "-alpha"), this was probably being confused with the build version ( ie. +testing_120). Both "+" and "-" are removed from these values so I have prepended "_internal" to the build number instead.
This commit is contained in:
parent
ed48fd2e82
commit
e854ee6a3c
1 changed files with 4 additions and 6 deletions
10
conanfile.py
10
conanfile.py
|
@ -152,12 +152,10 @@ class CuraConan(ConanFile):
|
|||
cura_version = self.conf_info.get("user.cura:version", default = self.version, check_type = str)
|
||||
if self.options.internal:
|
||||
version = Version(cura_version)
|
||||
self.output.error("="*100)
|
||||
self.output.error(f"version: {version}")
|
||||
self.output.error(f"cura_version: {cura_version}")
|
||||
self.output.error(f"version.prerelease: {version.prerelease}")
|
||||
self.output.error("="*100)
|
||||
cura_version = f"{version.major}.{version.minor}.{version.patch}-{version.prerelease.replace('+', '+internal_')}"
|
||||
if version.pre:
|
||||
cura_version = f"{version.major}.{version.minor}.{version.patch}-{version.pre}+internal_{version.build}"
|
||||
else:
|
||||
cura_version = f"{version.major}.{version.minor}.{version.patch}+internal_{version.build}"
|
||||
|
||||
with open(Path(location, "CuraVersion.py"), "w") as f:
|
||||
f.write(cura_version_py.render(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue