mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-06-30 06:25:11 +08:00
Allow for additional metadata to be passed along
This commit is contained in:
parent
069e788139
commit
c09eb17a24
12
.github/workflows/conan-recipe-version.yml
vendored
12
.github/workflows/conan-recipe-version.yml
vendored
@ -7,6 +7,11 @@ on:
|
|||||||
required: true
|
required: true
|
||||||
type: string
|
type: string
|
||||||
|
|
||||||
|
additional_buildmetadata:
|
||||||
|
required: false
|
||||||
|
default: ""
|
||||||
|
type: string
|
||||||
|
|
||||||
outputs:
|
outputs:
|
||||||
recipe_id_full:
|
recipe_id_full:
|
||||||
description: "The full Conan recipe id: <name>/<version>@<user>/<channel>"
|
description: "The full Conan recipe id: <name>/<version>@<user>/<channel>"
|
||||||
@ -79,6 +84,7 @@ jobs:
|
|||||||
issue_number = "${{ github.ref }}".split('/')[2]
|
issue_number = "${{ github.ref }}".split('/')[2]
|
||||||
is_tag = "${{ github.ref_type }}" == "tag"
|
is_tag = "${{ github.ref_type }}" == "tag"
|
||||||
is_release_branch = False
|
is_release_branch = False
|
||||||
|
buildmetadata = "" if "${{ inputs.additional_buildmetadata }}" == "" else "${{ inputs.additional_buildmetadata }}_"
|
||||||
|
|
||||||
# FIXME: for when we push a tag (such as an release)
|
# FIXME: for when we push a tag (such as an release)
|
||||||
channel = "testing"
|
channel = "testing"
|
||||||
@ -130,7 +136,7 @@ jobs:
|
|||||||
channel = "_"
|
channel = "_"
|
||||||
else:
|
else:
|
||||||
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()}+{buildmetadata}pr_{issue_number}_{no_commits}"
|
||||||
else:
|
else:
|
||||||
if channel in ("stable", "_", ""):
|
if channel in ("stable", "_", ""):
|
||||||
channel_metadata = f"{no_commits}"
|
channel_metadata = f"{no_commits}"
|
||||||
@ -139,9 +145,9 @@ jobs:
|
|||||||
# FIXME: for when we create a new release branch
|
# FIXME: for when we create a new release branch
|
||||||
if latest_branch_version.prerelease == "":
|
if latest_branch_version.prerelease == "":
|
||||||
bump_up_minor = int(latest_branch_version.minor) + 1
|
bump_up_minor = int(latest_branch_version.minor) + 1
|
||||||
actual_version = f"{latest_branch_version.major}.{bump_up_minor}.{latest_branch_version.patch}-alpha+{channel_metadata}"
|
actual_version = f"{latest_branch_version.major}.{bump_up_minor}.{latest_branch_version.patch}-alpha+{buildmetadata}{channel_metadata}"
|
||||||
else:
|
else:
|
||||||
actual_version = f"{latest_branch_version.major}.{latest_branch_version.minor}.{latest_branch_version.patch}-{latest_branch_version.prerelease.lower()}+{channel_metadata}"
|
actual_version = f"{latest_branch_version.major}.{latest_branch_version.minor}.{latest_branch_version.patch}-{latest_branch_version.prerelease.lower()}+{buildmetadata}{channel_metadata}"
|
||||||
|
|
||||||
# %% print to output
|
# %% print to output
|
||||||
cmd_name = ["echo", f"::set-output name=name::{project_name}"]
|
cmd_name = ["echo", f"::set-output name=name::{project_name}"]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user