Skip to content

Commit

Permalink
chore: need to example the whole message sometimes
Browse files Browse the repository at this point in the history
  • Loading branch information
pgollucci committed Oct 30, 2024
1 parent b99c98e commit 48c5545
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions bin/version.bash
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,21 @@ main() {
local minor=$(echo $latest_tag | cut -d. -f2)
local patch=$(echo $latest_tag | cut -d. -f3)

local log_lines=$(git log $latest_tag..HEAD --pretty="format:- %s")
local log_lines=$(git log $latest_tag..HEAD --pretty="format:%B")
local subject_lines=$(git log $latest_tag..HEAD --pretty="format:%s")

if echo "$log_lines" | grep -q "BREAKING CHANGE"; then
major=$((major + 1))
minor=0
patch=0
elif echo "$log_lines" | grep -q "major"; then
elif echo "$subject_lines" | grep -q "^major"; then
major=$((major + 1))
minor=0
patch=0
elif echo "$log_lines" | grep -q "feat"; then
elif echo "$subject_lines" | grep -q "^feat"; then
minor=$((minor + 1))
patch=0
elif echo "$log_lines" | grep -q "fix"; then
elif echo "$subject_lines" | grep -q "^fix"; then
patch=$((patch + 1))
fi

Expand Down

0 comments on commit 48c5545

Please sign in to comment.