diff --git a/iop/scripts/genconfig.sh b/iop/scripts/genconfig.sh index da5288018..4a8847783 100755 --- a/iop/scripts/genconfig.sh +++ b/iop/scripts/genconfig.sh @@ -424,8 +424,11 @@ function genconfig { # Set target version local GIT_TAG=$(git describe --abbrev=0 --tags) - echo "CONFIG_TARGET_VERSION=\"${GIT_TAG}\"" >> .config - echo "CONFIG_VERSION_CODE=\"${GIT_TAG}\"" >> .config + local GIT_REV=$(git rev-parse --short HEAD) + local GIT_VER="$GIT_TAG" + git describe --contains $GIT_REV >/dev/null 2>&1 || GIT_VER="${GIT_TAG}_${GIT_REV}" + echo "CONFIG_TARGET_VERSION=\"${GIT_VER}\"" >> .config + echo "CONFIG_VERSION_CODE=\"${GIT_VER}\"" >> .config echo "CONFIG_VERSION_PRODUCT=\"$BOARDTYPE"\" >> .config # Enable Package source tree override if selected