fix(ci): notify-chart-dev — drop default pipefail, set -eu after early echos
The Forgejo runner v12.9.0 was killing the gate echo with SIGPIPE
(exit 141) when the script ran under the runner's default
`bash -e -o pipefail {0}` shell. Override with `shell: bash {0}`
(no -e, no pipefail) so the early stable-tag check + log echos
don't get tripped by phantom pipe failures, then re-enable
`set -eu` for the actual bump logic where strictness matters.
This commit is contained in:
parent
2a70359b0a
commit
1ddd331f58
1 changed files with 14 additions and 8 deletions
|
|
@ -40,16 +40,17 @@ jobs:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
- name: Auto-bump chart develop appVersion + push
|
- name: Auto-bump chart develop appVersion + push
|
||||||
|
# Explicit shell flags — the Forgejo runner's default
|
||||||
|
# `bash -e -o pipefail {0}` was reporting our step as exit
|
||||||
|
# 141 (SIGPIPE) immediately after the first echo, even with
|
||||||
|
# no pipelines in the script. Switching to plain `bash {0}`
|
||||||
|
# (no -e, no pipefail) sidesteps that entirely. We use
|
||||||
|
# explicit `|| { ... ; exit 1; }` blocks for failure paths
|
||||||
|
# so error semantics are preserved.
|
||||||
|
shell: bash {0}
|
||||||
run: |
|
run: |
|
||||||
set -eu
|
|
||||||
|
|
||||||
# Self-skip if HEAD has a stable tag — the prod workflow
|
# Self-skip if HEAD has a stable tag — the prod workflow
|
||||||
# owns the chart bump in that case. Inlined here (rather
|
# owns the chart bump in that case.
|
||||||
# than as a separate gate step) because Forgejo runner
|
|
||||||
# v12.9.0 was exiting our gate step with 141 immediately
|
|
||||||
# after a clean echo + GITHUB_OUTPUT write. Folding the
|
|
||||||
# check into the bump step's strict-mode shell avoids the
|
|
||||||
# cross-step boundary entirely.
|
|
||||||
STABLE_TAGS=$(git tag --points-at HEAD --list 'zddc-server-v*')
|
STABLE_TAGS=$(git tag --points-at HEAD --list 'zddc-server-v*')
|
||||||
if [ -n "$STABLE_TAGS" ]; then
|
if [ -n "$STABLE_TAGS" ]; then
|
||||||
echo "HEAD has stable tag ($STABLE_TAGS) — stable workflow handles chart bump; skipping dev notify"
|
echo "HEAD has stable tag ($STABLE_TAGS) — stable workflow handles chart bump; skipping dev notify"
|
||||||
|
|
@ -62,6 +63,11 @@ jobs:
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Re-enable strict-mode for the rest of the script — failures
|
||||||
|
# in clone/sed/push must abort. The leading "no stable tag"
|
||||||
|
# echo is what tripped the runner; from here on it's safe.
|
||||||
|
set -eu
|
||||||
|
|
||||||
# Compose a beta version string that's unique per ZDDC commit.
|
# Compose a beta version string that's unique per ZDDC commit.
|
||||||
# Uses the next-stable target (max of latest tag + 1, mirrors
|
# Uses the next-stable target (max of latest tag + 1, mirrors
|
||||||
# ./build's _coordinated_next_stable) and the short SHA.
|
# ./build's _coordinated_next_stable) and the short SHA.
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue