chore(pkg-vsn.sh): add some comments

This commit is contained in:
Zaiming Shi 2021-05-30 08:03:32 +02:00 committed by Zaiming (Stone) Shi
parent 52a933f113
commit 387d7f5913
1 changed files with 2 additions and 0 deletions

View File

@ -12,8 +12,10 @@ else
EDITION='opensource'
fi
## emqx_release.hrl is the single source of truth for release version
RELEASE="$(grep -E "define.+EMQX_RELEASE.+${EDITION}" include/emqx_release.hrl | cut -d '"' -f2)"
## git commit hash is added as suffix in case the git tag and release version is not an exact match
if [ -d .git ] && ! git describe --tags --match "[e|v]${RELEASE}" --exact >/dev/null 2>&1; then
SUFFIX="-$(git rev-parse HEAD | cut -b1-8)"
fi