From 8682fa4f88ed31ceb2f26285ba43abc53c17991e Mon Sep 17 00:00:00 2001 From: Chris Coutinho Date: Sat, 20 Dec 2025 13:17:50 +0100 Subject: [PATCH] ci: Handle NO_COMMITS_TO_BUMP gracefully in bump scripts MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When commitizen finds no eligible commits to bump, it exits with code 1 and outputs [NO_COMMITS_TO_BUMP]. This was causing the GitHub Actions workflow to fail even though this is an expected scenario. Updated all three bump scripts (bump-mcp.sh, bump-helm.sh, bump-astrolabe.sh) to: - Detect the [NO_COMMITS_TO_BUMP] message - Exit with code 0 (success) instead of code 1 - Output an informational message instead of an error This allows the bump-version workflow to complete successfully when no version bumps are needed, matching the workflow's existing logic that handles empty BUMPED_COMPONENTS. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 --- scripts/bump-astrolabe.sh | 9 +++++++++ scripts/bump-helm.sh | 9 +++++++++ scripts/bump-mcp.sh | 8 ++++++++ 3 files changed, 26 insertions(+) diff --git a/scripts/bump-astrolabe.sh b/scripts/bump-astrolabe.sh index b0ba72d..b3aefaa 100755 --- a/scripts/bump-astrolabe.sh +++ b/scripts/bump-astrolabe.sh @@ -58,6 +58,15 @@ fi # Run commitizen bump and capture output if ! output=$($CZ_CMD 2>&1); then cd ../.. + + # Check if this is the expected "no commits to bump" case + if echo "$output" | grep -q "\[NO_COMMITS_TO_BUMP\]"; then + echo "â„šī¸ No commits eligible for version bump" >&2 + echo "$output" >&2 + exit 0 + fi + + # Otherwise, this is an actual error echo "❌ Error: Version bump failed" >&2 echo "$output" >&2 echo "" >&2 diff --git a/scripts/bump-helm.sh b/scripts/bump-helm.sh index 62e8e9e..f8086a9 100755 --- a/scripts/bump-helm.sh +++ b/scripts/bump-helm.sh @@ -53,6 +53,15 @@ fi # Run commitizen bump and capture output if ! output=$($CZ_CMD 2>&1); then cd ../.. + + # Check if this is the expected "no commits to bump" case + if echo "$output" | grep -q "\[NO_COMMITS_TO_BUMP\]"; then + echo "â„šī¸ No commits eligible for version bump" >&2 + echo "$output" >&2 + exit 0 + fi + + # Otherwise, this is an actual error echo "❌ Error: Version bump failed" >&2 echo "$output" >&2 echo "" >&2 diff --git a/scripts/bump-mcp.sh b/scripts/bump-mcp.sh index 9b39f03..37d56eb 100755 --- a/scripts/bump-mcp.sh +++ b/scripts/bump-mcp.sh @@ -44,6 +44,14 @@ fi # Run commitizen bump and capture output if ! output=$($CZ_CMD 2>&1); then + # Check if this is the expected "no commits to bump" case + if echo "$output" | grep -q "\[NO_COMMITS_TO_BUMP\]"; then + echo "â„šī¸ No commits eligible for version bump" >&2 + echo "$output" >&2 + exit 0 + fi + + # Otherwise, this is an actual error echo "❌ Error: Version bump failed" >&2 echo "$output" >&2 echo "" >&2