mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-06-30 12:45:10 +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
|
is_release_branch = False
|
||||||
|
|
||||||
# FIXME: for when we push a tag (such as an release)
|
# FIXME: for when we push a tag (such as an release)
|
||||||
|
channel = "testing"
|
||||||
if is_tag:
|
if is_tag:
|
||||||
branch_version = tools.Version("${{ github.ref_name }}")
|
branch_version = tools.Version("${{ github.ref_name }}")
|
||||||
is_release_branch = True
|
is_release_branch = True
|
||||||
else:
|
else:
|
||||||
try:
|
try:
|
||||||
branch_version = tools.Version(repo.active_branch.name)
|
branch_version = tools.Version(repo.active_branch.name)
|
||||||
channel = "stable"
|
|
||||||
except ConanException:
|
except ConanException:
|
||||||
branch_version = tools.Version('0.0.0')
|
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'
|
channel = 'stable'
|
||||||
is_release_branch = True
|
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'
|
channel = 'testing'
|
||||||
else:
|
else:
|
||||||
channel = repo.active_branch.name.split("_")[0].replace("-", "_").lower()
|
channel = repo.active_branch.name.split("_")[0].replace("-", "_").lower()
|
||||||
@ -130,10 +130,11 @@ jobs:
|
|||||||
if event_name == "pull_request":
|
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}"
|
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:
|
else:
|
||||||
if channel != "stable" or channel != "_" or channel != "":
|
if channel in ("stable", "_", ""):
|
||||||
channel_metadata = f"{channel}_{no_commits}"
|
|
||||||
else:
|
|
||||||
channel_metadata = f"{no_commits}"
|
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 == "":
|
if latest_branch_version.prerelease == "":
|
||||||
actual_version = f"{latest_branch_version.major}.{latest_branch_version.minor}.{latest_branch_version.patch}-alpha+{channel_metadata}"
|
actual_version = f"{latest_branch_version.major}.{latest_branch_version.minor}.{latest_branch_version.patch}-alpha+{channel_metadata}"
|
||||||
else:
|
else:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user