Skip to content

Commit

Permalink
Update versioning logic in build workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
rabilrbl committed Feb 4, 2024
1 parent 37ea851 commit bb34e44
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,15 +61,15 @@ jobs:
commits=$(git rev-list $tag.. --count)
echo "Commits since last tag: $commits"
# If any of commit messages contains "BREAKING" string, increment major version.
breaking_changes=$(git log $tag.. --pretty=%B | grep -iE "BREAKING" | wc -l)
breaking_changes=$(git log --pretty=%B $tag.. | grep -iE "BREAKING" | wc -l)
echo "Breaking changes: $breaking_changes"
if [[ $breaking_changes -gt 0 ]]; then
major=$((major + 1))
minor=0
patch=0
else
# Increment minor version.
features=$(git log $tag.. --pretty=%B | grep -iE "feat|compatibility|integration|upgrade" | wc -l)
features=$(git log --pretty=%B $tag.. | grep -iE "feat|compatibility|integration|upgrade" | wc -l)
echo "Features: $features"
if [[ $features -gt 0 ]]; then
minor=$((minor + 1))
Expand Down

0 comments on commit bb34e44

Please sign in to comment.