mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-06-30 07:55:11 +08:00
Fix buildmetadata containing stable
Contributes to CURA-9365
This commit is contained in:
parent
7568a897a0
commit
d1385a809a
13
.github/workflows/conan-recipe-version.yml
vendored
13
.github/workflows/conan-recipe-version.yml
vendored
@ -81,19 +81,19 @@ jobs:
|
||||
is_release_branch = False
|
||||
|
||||
# FIXME: for when we push a tag (such as an release)
|
||||
channel = "testing"
|
||||
if is_tag:
|
||||
branch_version = tools.Version("${{ github.ref_name }}")
|
||||
is_release_branch = True
|
||||
else:
|
||||
try:
|
||||
branch_version = tools.Version(repo.active_branch.name)
|
||||
channel = "stable"
|
||||
except ConanException:
|
||||
branch_version = tools.Version('0.0.0')
|
||||
if repo.active_branch.name == f"{branch_version.major}.{branch_version.minor}":
|
||||
if "${{ github.ref_name }}" == f"{branch_version.major}.{branch_version.minor}":
|
||||
channel = 'stable'
|
||||
is_release_branch = True
|
||||
elif repo.active_branch.name == "main" or repo.active_branch.name == "master":
|
||||
elif "${{ github.ref_name }}" in ("main", "master"):
|
||||
channel = 'testing'
|
||||
else:
|
||||
channel = repo.active_branch.name.split("_")[0].replace("-", "_").lower()
|
||||
@ -130,10 +130,11 @@ jobs:
|
||||
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()}+pr_{issue_number}_{no_commits}"
|
||||
else:
|
||||
if channel != "stable" or channel != "_" or channel != "":
|
||||
channel_metadata = f"{channel}_{no_commits}"
|
||||
else:
|
||||
if channel in ("stable", "_", ""):
|
||||
channel_metadata = f"{no_commits}"
|
||||
else:
|
||||
channel_metadata = f"{channel}_{no_commits}"
|
||||
# FIXME: for when we create a new release branch
|
||||
if latest_branch_version.prerelease == "":
|
||||
actual_version = f"{latest_branch_version.major}.{latest_branch_version.minor}.{latest_branch_version.patch}-alpha+{channel_metadata}"
|
||||
else:
|
||||
|
Loading…
x
Reference in New Issue
Block a user