add change counter

This commit is contained in:
Kurnianto Trilaksono
2024-03-27 00:15:00 +08:00
parent a7de0cc8cd
commit fbc102dbd3

View File

@@ -7,6 +7,8 @@ declare rc=0
git log $(git describe --tags --abbrev=0)..HEAD --oneline | tee /tmp/release-changelogs.txt
count=$(cat /tmp/release-changelogs.txt | wc -l)
if [[ $(cat /tmp/release-changelogs.txt | grep fix) || $(cat /tmp/release-changelogs.txt | grep patch) || $(cat /tmp/release-changelogs.txt | grep chore) ]]; then
PATCH=true
fi
@@ -30,7 +32,7 @@ fi
echo -e "\n"
echo -e "================================================================================="
echo "Change counter: $(echo $count | tr -s ' ')"
if [[ $MAJOR == false && $MINOR == false ]]; then
echo "Recommended release type: patch"
elif [[ $MAJOR == false && $MINOR == true ]]; then