chore: add bpapi check cut.sh

This commit is contained in:
Zaiming (Stone) Shi 2023-09-29 14:42:05 +02:00
parent eb4a2ad4d5
commit deece276be
1 changed files with 37 additions and 17 deletions

View File

@ -242,10 +242,25 @@ check_changelog() {
fi fi
} }
if [ "$DRYRUN" = 'yes' ]; then check_bpapi() {
logmsg "Release tag is ready to be created with command: git tag $TAG" local fname
else
case "$TAG" in case "$TAG" in
*.0)
fname="$(echo "$TAG" | sed 's/^e//; s/\.0$//')"
fpath="apps/emqx/test/emqx_static_checks_data/${fname}.bpapi"
logmsg "Checking $fpath"
if [ ! -f "$fpath" ]; then
logerr "BPAPI file missing: $fpath"
exit 1
fi
;;
*)
true
;;
esac
}
case "$TAG" in
*rc*) *rc*)
true true
;; ;;
@ -256,12 +271,17 @@ else
true true
;; ;;
e*) e*)
check_bpapi
check_changelog check_changelog
;; ;;
v*) v*)
check_changelog check_changelog
;; ;;
esac esac
if [ "$DRYRUN" = 'yes' ]; then
logmsg "Release tag is ready to be created with command: git tag $TAG"
else
git tag "$TAG" git tag "$TAG"
logmsg "$TAG is created OK." logmsg "$TAG is created OK."
logwarn "Don't forget to push the tag!" logwarn "Don't forget to push the tag!"