ci: Handle NO_COMMITS_TO_BUMP gracefully in bump scripts

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 <noreply@anthropic.com>
This commit is contained in:
Chris Coutinho
2025-12-20 13:17:50 +01:00
parent 53b84200d4
commit 8682fa4f88
3 changed files with 26 additions and 0 deletions
+9
View File
@@ -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
+9
View File
@@ -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
+8
View File
@@ -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