Skip to content

Commit

Permalink
Merge pull request #3572 from onflow/bastian/fix-bump-version
Browse files Browse the repository at this point in the history
Fix the version update check
  • Loading branch information
turbolent committed Sep 9, 2024
2 parents 14be5c3 + 2846073 commit b5c05a6
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions bump-version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@ esac
echo "$v => $v2"

for f in $VERSIONED_FILES; do \
prevCount=$(grep -c -i "$v2" "$f")

# Replace the version.
echo "- $f"; \
if [[ "$OSTYPE" == "darwin"* ]]; then
Expand All @@ -38,9 +36,9 @@ for f in $VERSIONED_FILES; do \
fi

# Check if the version has being properly replaced.
newCount=$(grep -c -i "$v2" "$f")
if [[ $newCount -le $prevCount ]]; then
echo "fail to update version in '$f'"
git diff --exit-code -s "$f"
if [[ $? -ne 1 ]]; then
echo "failed to update version in '$f'"
exit 1
fi
done

0 comments on commit b5c05a6

Please sign in to comment.