From 71d6b64f81f4db33421c1e5400513c3c90f4aa6e Mon Sep 17 00:00:00 2001 From: enricobuehler Date: Fri, 12 Jun 2026 22:48:12 +0000 Subject: [PATCH] fix(ci): POSIX shell in deb/rpm Version step (dash "Bad substitution") MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit deb.yml runs in the Ubuntu rust-ci image whose /bin/sh is dash, where the bash substring `${GITHUB_SHA::8}` is a "Bad substitution" — the deb build failed at the Version step every run. Compute the short SHA with `cut` instead. (rpm.yml ran fine because the Fedora image's /bin/sh is bash, but fix it the same way for robustness.) Co-Authored-By: Claude Opus 4.8 (1M context) --- .gitea/workflows/deb.yml | 3 ++- .gitea/workflows/rpm.yml | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/deb.yml b/.gitea/workflows/deb.yml index 6e99620..02bbeff 100644 --- a/.gitea/workflows/deb.yml +++ b/.gitea/workflows/deb.yml @@ -60,9 +60,10 @@ jobs: # BEFORE 0.0.1 (the '~') yet monotonically increases by run number, so `apt upgrade` # always moves the boxes to the newest main build. run: | + SHORT=$(echo "$GITHUB_SHA" | cut -c1-8) case "$GITHUB_REF" in refs/tags/v*) V="${GITHUB_REF_NAME#v}" ;; - *) V="0.0.1~ci${GITHUB_RUN_NUMBER}.g${GITHUB_SHA::8}" ;; + *) V="0.0.1~ci${GITHUB_RUN_NUMBER}.g${SHORT}" ;; esac echo "VERSION=$V" >> "$GITHUB_ENV" echo "package version $V" diff --git a/.gitea/workflows/rpm.yml b/.gitea/workflows/rpm.yml index 7773efc..2c769a6 100644 --- a/.gitea/workflows/rpm.yml +++ b/.gitea/workflows/rpm.yml @@ -46,9 +46,10 @@ jobs: # sorts BEFORE the eventual "1" yet increases by run number, so `rpm-ostree upgrade` # always moves to the newest main build. run: | + SHORT=$(echo "$GITHUB_SHA" | cut -c1-8) case "$GITHUB_REF" in refs/tags/v*) V="${GITHUB_REF_NAME#v}"; R="1" ;; - *) V="0.0.1"; R="0.ci${GITHUB_RUN_NUMBER}.g${GITHUB_SHA::8}" ;; + *) V="0.0.1"; R="0.ci${GITHUB_RUN_NUMBER}.g${SHORT}" ;; esac echo "PF_VERSION=$V" >> "$GITHUB_ENV" echo "PF_RELEASE=$R" >> "$GITHUB_ENV"