Skip to content

chore(release): harden update-version.sh with set -euo pipefail#21

Merged
rqbazan merged 1 commit into
mainfrom
chore/harden-update-version-script
Apr 27, 2026
Merged

chore(release): harden update-version.sh with set -euo pipefail#21
rqbazan merged 1 commit into
mainfrom
chore/harden-update-version-script

Conversation

@rqbazan

@rqbazan rqbazan commented Apr 27, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Adds #!/usr/bin/env bash shebang and set -euo pipefail to update-version.sh.
  • Without these, the release script silently continued past failures. Example: a failed git push origin main would not stop the subsequent git tag / git push origin v1 --force, leaving the local repo with tags that were never published, or a remote commit without its tag.

Why now

Discovered during the v1.2.0 release prep for #20. No behavior change on the happy path — the existing if git rev-parse ... idiom is set -e-safe because set -e does not trigger inside conditionals.

Test plan

  • bash -n update-version.sh (syntax OK)
  • Manual: next release will exercise the hardened script

🤖 Generated with Claude Code

Without these, the release script silently continued past failures
(e.g. a failed `git push origin main` would not stop the subsequent
`git tag` / `git push origin v1 --force`, leaving the local repo
with tags that were never published or a remote commit without its
tag). Adds a bash shebang too so `pipefail` is guaranteed available.

No behavior change on the happy path — the existing `if git rev-parse`
idiom is set -e safe.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@rqbazan rqbazan merged commit 3a1c7ff into main Apr 27, 2026
2 checks passed
@rqbazan rqbazan deleted the chore/harden-update-version-script branch April 27, 2026 12:45
@rqbazan rqbazan restored the chore/harden-update-version-script branch April 27, 2026 12:45
@rqbazan rqbazan deleted the chore/harden-update-version-script branch April 27, 2026 13:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant