Explorar o código

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

Zaiming Shi %!s(int64=4) %!d(string=hai) anos
pai
achega
387d7f5913
Modificáronse 1 ficheiros con 2 adicións e 0 borrados
  1. 2 0
      pkg-vsn.sh

+ 2 - 0
pkg-vsn.sh

@@ -12,8 +12,10 @@ else
     EDITION='opensource'
     EDITION='opensource'
 fi
 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)"
 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
 if [ -d .git ] && ! git describe --tags --match "[e|v]${RELEASE}" --exact >/dev/null 2>&1; then
     SUFFIX="-$(git rev-parse HEAD | cut -b1-8)"
     SUFFIX="-$(git rev-parse HEAD | cut -b1-8)"
 fi
 fi