From deece276bee656d94565ffc453bd0ba8ce0faf2e Mon Sep 17 00:00:00 2001 From: "Zaiming (Stone) Shi" Date: Fri, 29 Sep 2023 14:42:05 +0200 Subject: [PATCH] chore: add bpapi check cut.sh --- scripts/rel/cut.sh | 54 +++++++++++++++++++++++++++++++--------------- 1 file changed, 37 insertions(+), 17 deletions(-) diff --git a/scripts/rel/cut.sh b/scripts/rel/cut.sh index 6d1c77de4..5b0e855d1 100755 --- a/scripts/rel/cut.sh +++ b/scripts/rel/cut.sh @@ -242,26 +242,46 @@ check_changelog() { 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 logmsg "Release tag is ready to be created with command: git tag $TAG" else - case "$TAG" in - *rc*) - true - ;; - *alpha*) - true - ;; - *beta*) - true - ;; - e*) - check_changelog - ;; - v*) - check_changelog - ;; - esac git tag "$TAG" logmsg "$TAG is created OK." logwarn "Don't forget to push the tag!"