From 12566533196672832eada9a52bc77a5a7072edc2 Mon Sep 17 00:00:00 2001 From: mathias Date: Fri, 24 Jul 2026 15:44:55 +0200 Subject: [PATCH] fix(ci): release.yml tag job dies whenever a commit has no Bump-Type footer (skills#8) set -euo pipefail + `... | grep -iE '^Bump-Type:' | head -1 | awk ...` inside `bump=$(...)`: when the last commit has no Bump-Type footer (the normal default-to-patch case), grep exits 1 on no-match. Under pipefail, that propagates as the whole pipeline's exit status even though head/awk both succeed -- set -e then kills the script before it ever reaches the case statement. Broke on every push since 2026-06-22 once a footer-less commit landed after the last one that happened to carry a Bump-Type line. Appended `|| true` to swallow the expected no-match case. --- .gitea/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index 7042f71..2ce5741 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -39,7 +39,7 @@ jobs: major=$(echo "$latest" | sed -E 's/^v([0-9]+)\.([0-9]+)\.([0-9]+)$/\1/') minor=$(echo "$latest" | sed -E 's/^v([0-9]+)\.([0-9]+)\.([0-9]+)$/\2/') patch=$(echo "$latest" | sed -E 's/^v([0-9]+)\.([0-9]+)\.([0-9]+)$/\3/') - bump=$(printf '%s' "$last_commit" | grep -iE '^Bump-Type:' | head -1 | awk '{print tolower($2)}') + bump=$(printf '%s' "$last_commit" | grep -iE '^Bump-Type:' | head -1 | awk '{print tolower($2)}' || true) case "$bump" in major) major=$((major + 1)); minor=0; patch=0 ;; minor) minor=$((minor + 1)); patch=0 ;;