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,26 +242,46 @@ check_changelog() {
fi fi
} }
check_bpapi() {
local fname
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*)
true
;;
*alpha*)
true
;;
*beta*)
true
;;
e*)
check_bpapi
check_changelog
;;
v*)
check_changelog
;;
esac
if [ "$DRYRUN" = 'yes' ]; then if [ "$DRYRUN" = 'yes' ]; then
logmsg "Release tag is ready to be created with command: git tag $TAG" logmsg "Release tag is ready to be created with command: git tag $TAG"
else else
case "$TAG" in
*rc*)
true
;;
*alpha*)
true
;;
*beta*)
true
;;
e*)
check_changelog
;;
v*)
check_changelog
;;
esac
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!"