chore: exclude alpha beta and rc tags when checking app.src vsn bump

This commit is contained in:
Zaiming (Stone) Shi 2022-02-14 19:32:59 +01:00
parent 15d3e86089
commit 072ecd06f6
1 changed files with 10 additions and 1 deletions

View File

@ -1,7 +1,16 @@
#!/usr/bin/env bash
set -euo pipefail
latest_release=$(git describe --abbrev=0 --tags)
## compare to the latest 5.0 release version tag:
## but do not include alpha, beta and rc versions
latest_release="$(git describe --abbrev=0 --tags --match '[v|e]5.0*' --exclude '*beta*' --exclude '*alpha*' --exclude '*rc*' || echo 'nomatch')"
if [ "$latest_release" = 'nomatch' ]; then
echo "No base release found, skipping app vsn checks"
exit 0
fi
echo "Compare base: $latest_release"
bad_app_count=0