add pr rules, fix script

This commit is contained in:
Kurnianto Trilaksono
2024-04-24 20:30:34 +08:00
parent 63329d175a
commit 25c7e17fb8
2 changed files with 34 additions and 2 deletions

View File

@@ -15,7 +15,7 @@ git log "${LATEST_TAG}..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
if [[ $(cat /tmp/release-changelogs.txt | grep fix) || $(cat /tmp/release-changelogs.txt | grep patch) || $(cat /tmp/release-changelogs.txt | grep chore) || $(cat /tmp/release-changelogs.txt | grep docs) ]]; then
PATCH=true
fi
@@ -23,6 +23,13 @@ if [[ $(cat /tmp/release-changelogs.txt | grep feat) ]]; then
MINOR=true
fi
for commit in $(cut -d' ' -f1 /tmp/release-changelogs.txt); do
git log --format=%B -n 1 $commit | grep "BREAKING CHANGE"
if [ $? -eq 0 ]; then
MAJOR=true
fi
done
for f in $(find api); do
git diff "${LATEST_TAG}...${ORIGIN_MASTER}" --exit-code -- "${f}"
if [ $? -eq 1 ]; then