Skip to content

Commit

Permalink
fix: semver
Browse files Browse the repository at this point in the history
  • Loading branch information
Gabriel Musat committed Dec 12, 2022
1 parent ca308e9 commit 77d1954
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions .github/semver.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ set -eu
CURRENT_TAG=$(git describe --abbrev=0 --tags || echo 'v0.0.0')
CURRENT_TAG_NO_V=${CURRENT_TAG#"v"}

PATCH=$(echo $CURRENT_TAG_NO_V | cut -d'.' -f1)
PATCH=$(echo $CURRENT_TAG_NO_V | cut -d'.' -f3)
MINOR=$(echo $CURRENT_TAG_NO_V | cut -d'.' -f2)
MAJOR=$(echo $CURRENT_TAG_NO_V | cut -d'.' -f3)
MAJOR=$(echo $CURRENT_TAG_NO_V | cut -d'.' -f1)

BUMP=0
while IFS= read -r line; do
Expand All @@ -19,7 +19,7 @@ while IFS= read -r line; do
MINOR=0
MAJOR=$((MAJOR+1))
fi
elif [[ $line == feat:* || $line == feat\(*\):* ]]; then
elif [[ $line == *feat:* || $line == *feat\(*\):* ]]; then
if [[ $BUMP -lt 2 ]]; then
BUMP=2

Expand All @@ -33,7 +33,7 @@ while IFS= read -r line; do
PATCH=$((PATCH+1))
fi
fi
done <<< "$(git log --oneline $(git describe --tags --abbrev=0 @^)..@ | cat | awk '{print}')"
done <<< "$(git log --oneline $(git describe --tags --abbrev=0 @^)..@)"

if [[ $BUMP == 0 ]]; then
echo "There is nothing new to release"
Expand Down

0 comments on commit 77d1954

Please sign in to comment.