File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -34,15 +34,17 @@ jobs:
3434 # Check last tag and commits to determine bump
3535 LAST_TAG=$(git describe --tags --abbrev=0 2>/dev/null || echo "")
3636 if [ -z "$LAST_TAG" ]; then
37- # No previous tags - check all commits on main
38- FEAT_COUNT=$(git log --all --oneline | grep -c "^feat:" || echo "0")
39- FIX_COUNT=$(git log --all --oneline | grep -c "^fix:" || echo "0")
37+ # No previous tags - check commits on main
38+ FEAT_COUNT=$(git log origin/main --oneline | grep -c "^feat:" || echo "0")
39+ FIX_COUNT=$(git log origin/main --oneline | grep -c "^fix:" || echo "0")
4040 else
41- FEAT_COUNT=$(git log --pretty=format:"%s" $LAST_TAG..HEAD --ancestry-path | grep -c "^feat:" || echo "0")
42- FIX_COUNT=$(git log --pretty=format:"%s" $LAST_TAG..HEAD --ancestry-path | grep -c "^fix:" || echo "0")
41+ # Check commits since last tag
42+ FEAT_COUNT=$(git log $LAST_TAG..origin/main --oneline | grep -c "^feat:" || echo "0")
43+ FIX_COUNT=$(git log $LAST_TAG..origin/main --oneline | grep -c "^fix:" || echo "0")
4344 fi
4445 FEAT_COUNT=$(echo "$FEAT_COUNT" | tr -d '[:space:]')
4546 FIX_COUNT=$(echo "$FIX_COUNT" | tr -d '[:space:]')
47+ echo "FEAT_COUNT=$FEAT_COUNT FIX_COUNT=$FIX_COUNT LAST_TAG=$LAST_TAG"
4648 if [ "${FEAT_COUNT:-0}" -gt 0 ]; then
4749 BUMP="minor"
4850 elif [ "${FIX_COUNT:-0}" -gt 0 ]; then
You can’t perform that action at this time.
0 commit comments