From 7ea0c41c9cd91bb6e62042cd8f160317e5cbe86f Mon Sep 17 00:00:00 2001 From: jspijker Date: Mon, 27 Feb 2023 14:21:53 +0100 Subject: [PATCH 1/5] Only create tags below 6.0.0 The firmware tags are messing with the versioning system as well Contribute to CURA-10317 --- .github/workflows/conan-recipe-version.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/conan-recipe-version.yml b/.github/workflows/conan-recipe-version.yml index 6d0218f609..6a3999b7ae 100644 --- a/.github/workflows/conan-recipe-version.yml +++ b/.github/workflows/conan-recipe-version.yml @@ -139,8 +139,8 @@ jobs: version = Version(tag) except ConanException: continue - if version > latest_branch_version and version < Version("10.0.0"): - # FIXME: stupid old Cura tags 13.04 etc. keep popping up + if version > latest_branch_version and version < Version("6.0.0"): + # FIXME: stupid old Cura tags 13.04 etc. keep popping up, als the fdm_material tag for firmware are messing with this latest_branch_version = version latest_branch_tag = repo.tag(tag) From 50c338982e4e113b71d8e6588df9f7c89017b17d Mon Sep 17 00:00:00 2001 From: jspijker Date: Mon, 27 Feb 2023 14:43:31 +0100 Subject: [PATCH 2/5] `prerelease` is deprecated in favor of `pre` Contribute to CURA-10317 --- .github/workflows/conan-recipe-version.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/conan-recipe-version.yml b/.github/workflows/conan-recipe-version.yml index 6a3999b7ae..4a70e897bd 100644 --- a/.github/workflows/conan-recipe-version.yml +++ b/.github/workflows/conan-recipe-version.yml @@ -151,10 +151,10 @@ jobs: if commit == latest_branch_tag.commit: break no_commits += 1 - latest_branch_version_prerelease = latest_branch_version.prerelease - if latest_branch_version.prerelease and not "." in latest_branch_version.prerelease: + latest_branch_version_prerelease = latest_branch_version.pre + if latest_branch_version.pre and not "." in latest_branch_version.pre: # The prerealese did not contain a version number, default it to 1 - latest_branch_version_prerelease = f"{latest_branch_version.prerelease}.1" + latest_branch_version_prerelease = f"{latest_branch_version.pre}.1" if event_name == "pull_request": actual_version = f"{latest_branch_version.major}.{latest_branch_version.minor}.{latest_branch_version.patch}-{latest_branch_version_prerelease.lower()}+{buildmetadata}pr_{issue_number}_{no_commits}" channel_metadata = f"{channel}_{no_commits}" @@ -164,16 +164,16 @@ jobs: else: channel_metadata = f"{channel}_{no_commits}" if is_release_branch: - if latest_branch_version.prerelease == "" and branch_version > latest_branch_version: + if latest_branch_version.pre == "" and branch_version > latest_branch_version: actual_version = f"{branch_version.major}.{branch_version.minor}.0-beta.1+{buildmetadata}{channel_metadata}" - elif latest_branch_version.prerelease == "": + elif latest_branch_version.pre == "": # An actual full release has been created, we are working on patch bump_up_patch = int(latest_branch_version.patch) + 1 actual_version = f"{latest_branch_version.major}.{latest_branch_version.minor}.{bump_up_patch}-beta.1+{buildmetadata}{channel_metadata}" else: # An beta release has been created we are working toward a next beta or full release - bump_up_release_tag = int(latest_branch_version.prerelease.split('.')[1]) + 1 - actual_version = f"{latest_branch_version.major}.{latest_branch_version.minor}.{latest_branch_version.patch}-{latest_branch_version.prerelease.split('.')[0]}.{bump_up_release_tag}+{buildmetadata}{channel_metadata}" + bump_up_release_tag = int(latest_branch_version.pre.split('.')[1]) + 1 + actual_version = f"{latest_branch_version.major}.{latest_branch_version.minor}.{latest_branch_version.patch}-{latest_branch_version.pre.split('.')[0]}.{bump_up_release_tag}+{buildmetadata}{channel_metadata}" else: max_branches_version = Version("0.0.0") branches_no_commits = no_commits From cca312712a94bfc05f03c2f4f802268fbc02e744 Mon Sep 17 00:00:00 2001 From: jspijker Date: Mon, 27 Feb 2023 14:46:34 +0100 Subject: [PATCH 3/5] cast `pre` to str to check for . Contribute to CURA-10317 --- .github/workflows/conan-recipe-version.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/conan-recipe-version.yml b/.github/workflows/conan-recipe-version.yml index 4a70e897bd..0472fe8164 100644 --- a/.github/workflows/conan-recipe-version.yml +++ b/.github/workflows/conan-recipe-version.yml @@ -152,7 +152,7 @@ jobs: break no_commits += 1 latest_branch_version_prerelease = latest_branch_version.pre - if latest_branch_version.pre and not "." in latest_branch_version.pre: + if latest_branch_version.pre and not "." in str(latest_branch_version.pre): # The prerealese did not contain a version number, default it to 1 latest_branch_version_prerelease = f"{latest_branch_version.pre}.1" if event_name == "pull_request": From fdc515b356bb20f656cd97b0ff269bfc196caedb Mon Sep 17 00:00:00 2001 From: jspijker Date: Mon, 27 Feb 2023 14:49:16 +0100 Subject: [PATCH 4/5] cast versions to str before casting to int Contribute to CURA-10317 --- .github/workflows/conan-recipe-version.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/conan-recipe-version.yml b/.github/workflows/conan-recipe-version.yml index 0472fe8164..1091b6cb4e 100644 --- a/.github/workflows/conan-recipe-version.yml +++ b/.github/workflows/conan-recipe-version.yml @@ -168,11 +168,11 @@ jobs: actual_version = f"{branch_version.major}.{branch_version.minor}.0-beta.1+{buildmetadata}{channel_metadata}" elif latest_branch_version.pre == "": # An actual full release has been created, we are working on patch - bump_up_patch = int(latest_branch_version.patch) + 1 + bump_up_patch = int(str(latest_branch_version.patch)) + 1 actual_version = f"{latest_branch_version.major}.{latest_branch_version.minor}.{bump_up_patch}-beta.1+{buildmetadata}{channel_metadata}" else: # An beta release has been created we are working toward a next beta or full release - bump_up_release_tag = int(latest_branch_version.pre.split('.')[1]) + 1 + bump_up_release_tag = int(str(latest_branch_version.pre.split('.')[1])) + 1 actual_version = f"{latest_branch_version.major}.{latest_branch_version.minor}.{latest_branch_version.patch}-{latest_branch_version.pre.split('.')[0]}.{bump_up_release_tag}+{buildmetadata}{channel_metadata}" else: max_branches_version = Version("0.0.0") @@ -187,9 +187,9 @@ jobs: except: pass if max_branches_version > latest_branch_version: - actual_version = f"{max_branches_version.major}.{int(max_branches_version.minor) + 1}.0-alpha+{buildmetadata}{channel}_{branches_no_commits}" + actual_version = f"{max_branches_version.major}.{int(str(max_branches_version.minor)) + 1}.0-alpha+{buildmetadata}{channel}_{branches_no_commits}" else: - actual_version = f"{latest_branch_version.major}.{int(latest_branch_version.minor) + 1}.0-alpha+{buildmetadata}{channel_metadata}" + actual_version = f"{latest_branch_version.major}.{int(str(latest_branch_version.minor)) + 1}.0-alpha+{buildmetadata}{channel_metadata}" # %% Set the environment output output_env = os.environ["GITHUB_OUTPUT"] From 004213723eb8f1f4cafe8de00fdc3d163458741e Mon Sep 17 00:00:00 2001 From: jspijker Date: Mon, 27 Feb 2023 15:21:10 +0100 Subject: [PATCH 5/5] Use cura_10317 channel Revert after merge to main Contribute to CURA-10317 --- conanfile.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/conanfile.py b/conanfile.py index e4a3c38593..d3ef5c6028 100644 --- a/conanfile.py +++ b/conanfile.py @@ -296,11 +296,11 @@ class CuraConan(ConanFile): self.requires("pysavitar/5.2.2") self.requires("pynest2d/5.2.2") self.requires("uranium/(latest)@ultimaker/testing") - self.requires("fdm_materials/(latest)@{}/testing".format("internal" if self.options.internal else "ultimaker")) + self.requires("fdm_materials/(latest)@{}/cura_10317".format("internal" if self.options.internal else "ultimaker")) self.requires("cura_binary_data/(latest)@ultimaker/testing") self.requires("cpython/3.10.4") if self.options.internal: - self.requires("cura_private_data/(latest)@ultimaker/testing") + self.requires("cura_private_data/(latest)@ultimaker/cura_10317") def build_requirements(self): if self.options.devtools: