From 8d6ac37f5668505b547c190194f661f622c67121 Mon Sep 17 00:00:00 2001 From: Charlie Sharpsteen Date: Wed, 15 Jul 2026 09:33:50 -0500 Subject: [PATCH] Munge pre-release versions in Vanagon builds PR OpenVoxProject/vanagon#95 updated Vanagon's handling of Git tags. If the tag matches a semver.org pre-release with "alpha", "beta" or "rc" as the pre-release identifier, then the "-" in the version string is substituted for "~". That is, a tag like `9.0.0-beta1` becomes the following package version: `9.0.0~beta1` This is done because the `dpkg` and `rpm` package managers treat `~` specially and sort any version strings containing it before all other strings. This changes allows a `9.0.0~alpha1` package to upgrade to `9.0.0~beta1`, and then to `9.0.0~rc0`, and finally to `9.0.0`. This commit updates the munging logic in the `build_vanagon.yml` workflow to correctly pass these versions to `rake vox:upload`. See: https://semver.org See: https://manpages.debian.org/bookworm/dpkg-dev/deb-version.7.en.html#Sorting_algorithm See: https://rpm.org/docs/6.0.x/man/rpm-version.7#Comparing Signed-off-by: Charlie Sharpsteen --- .github/workflows/build_vanagon.yml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build_vanagon.yml b/.github/workflows/build_vanagon.yml index efa118c..0f2f59e 100644 --- a/.github/workflows/build_vanagon.yml +++ b/.github/workflows/build_vanagon.yml @@ -267,7 +267,16 @@ jobs: run: |- rm -rf output DESCRIBE=$(git describe --abbrev=9) - echo "describe=${DESCRIBE//-/.}" >> $GITHUB_OUTPUT + + case "${DESCRIBE}" in + *-alpha[0-9]|*-beta[0-9]|*-rc[0-9]) + printf 'describe=%s\n' "$(sed 's/-/~/' <<<"$DESCRIBE")" >>$GITHUB_OUTPUT + ;; + *) + printf 'describe=%s\n' "${DESCRIBE//-/.}" >>$GITHUB_OUTPUT + ;; + esac + bundle exec rake "vox:build[${PROJECT_NAME},${BUILD_PLATFORM}]" - name: Upload build artifacts