From 5612e271fbde6b8808cc8d4c318099bec124f7b1 Mon Sep 17 00:00:00 2001 From: Lucas Schwiderski Date: Wed, 12 Mar 2025 11:26:24 +0100 Subject: [PATCH 1/2] Improve version name for CI artifacts built off master The name from `git describe --tags` is rather confusing to people that aren't familiar with it. Especially in the current situation, where there are no proper versioned releases. A name like `master-123456` should be much clearer. Closes #205. --- .ci/tasks/build.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.ci/tasks/build.sh b/.ci/tasks/build.sh index bb96775..11b0300 100755 --- a/.ci/tasks/build.sh +++ b/.ci/tasks/build.sh @@ -25,7 +25,8 @@ if [ -n "$PR" ]; then title "PR: $(echo "$PR" | jq '.number') - $(echo "$PR" | jq '.title')" ref="pr-$(echo "$PR" | jq '.number')-$(git rev-parse --short "$(cat .git/ref || echo "HEAD")" 2>/dev/null || echo 'manual')" else - ref=$(git describe --tags) + ref=$(cat .git/ref || echo "HEAD") + ref=$(git rev-parse --abbrev-ref $ref)-$(git rev-parse --short $ref) fi title "Version: '$ref'" -- 2.45.3 From beba47f340ea5f1990458029752ca0b138f226a6 Mon Sep 17 00:00:00 2001 From: Lucas Schwiderski Date: Wed, 12 Mar 2025 11:33:48 +0100 Subject: [PATCH 2/2] Push a packaged with a fixed version for master To provide something that can easily be linked to, also push packages built from `master` to a version that doesn't contain the SHA. --- .ci/pipelines/base.yml | 38 +++++++++++++++++++++++++++++++------- .ci/tasks/build.yml | 1 - 2 files changed, 31 insertions(+), 8 deletions(-) diff --git a/.ci/pipelines/base.yml b/.ci/pipelines/base.yml index 474c090..8d3cc77 100644 --- a/.ci/pipelines/base.yml +++ b/.ci/pipelines/base.yml @@ -125,8 +125,6 @@ jobs: vars: pr: "" target: msvc - gitea_url: http://forgejo:3000 - gitea_api_key: ((gitea_api_key)) - load_var: version_number reveal: true @@ -142,10 +140,21 @@ jobs: fail_fast: true override: true globs: - - artifact/dtmt - - artifact/dtmm - artifact/*.exe - - artifact/*.sha256 + - artifact/*.exe.sha256 + + - put: package + resource: gitea-package + no_get: true + inputs: + - artifact + params: + version: master + fail_fast: true + override: true + globs: + - artifact/*.exe + - artifact/*.exe.sha256 - name: build-linux on_success: @@ -202,5 +211,20 @@ jobs: globs: - artifact/dtmt - artifact/dtmm - - artifact/*.exe - - artifact/*.sha256 + - artifact/dtmm.sha256 + - artifact/dtmt.sha256 + + - put: package + resource: gitea-package + no_get: true + inputs: + - artifact + params: + version: master + fail_fast: true + override: true + globs: + - artifact/dtmt + - artifact/dtmm + - artifact/dtmm.sha256 + - artifact/dtmt.sha256 diff --git a/.ci/tasks/build.yml b/.ci/tasks/build.yml index dce44d0..a7f47b4 100644 --- a/.ci/tasks/build.yml +++ b/.ci/tasks/build.yml @@ -22,7 +22,6 @@ caches: params: CI: "true" TARGET: ((target)) - GITEA_API_KEY: ((gitea_api_key)) PR: ((pr)) OUTPUT: artifact -- 2.45.3