From 5de07ed5ac44df5f416047bc1898507d1e686e3c Mon Sep 17 00:00:00 2001 From: "Ricardo Q. Bazan" Date: Mon, 27 Apr 2026 07:41:24 -0500 Subject: [PATCH] chore(release): harden update-version.sh with set -euo pipefail MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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) --- update-version.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/update-version.sh b/update-version.sh index 3e69a9c..f44ee49 100755 --- a/update-version.sh +++ b/update-version.sh @@ -1,3 +1,6 @@ +#!/usr/bin/env bash +set -euo pipefail + VERSION_NUMBER=$(grep '"version"' package.json | cut -d '"' -f 4) MAJOR_VERSION_NUMBER=$(echo "$VERSION_NUMBER" | cut -d '.' -f 1) VERSION=$(echo "v$VERSION_NUMBER")