use tag as clover revision, by n.d.k

Signed-off-by: Sergey Isakov <isakov-sl@bk.ru>
This commit is contained in:
Sergey Isakov 2019-10-07 04:26:31 +03:00
parent 8e745d4212
commit edab3b2144

View File

@ -74,7 +74,7 @@ NOBOOTFILES=0
declare -r GIT=`which git`
#declare -r GITDIR=`git status 2> /dev/null` # unsafe as git repository may exist in parent directory
declare -r VERSTXT="vers.txt"
#declare -r VERSTXT="vers.txt"
if [[ -x "/usr/bin/sw_vers" ]]; then
declare -r OSVER="$(sw_vers -productVersion | sed -e 's/\.0$//g')"
elif [[ -x "/usr/bin/lsb_release" ]]; then
@ -573,8 +573,8 @@ MainBuildScript() {
# Build Clover version
if (( $SkipAutoGen == 0 )) || (( $FORCEREBUILD == 1 )); then
local clover_revision=$(cat "${CLOVERROOT}/${VERSTXT}")
# local clover_revision=$(cat "${CLOVERROOT}/${VERSTXT}")
local clover_revision=$(git describe --tags $(git rev-list --tags --max-count=1)
local clover_build_date=$(date '+%Y-%m-%d %H:%M:%S')
#echo "#define FIRMWARE_VERSION \"2.31\"" > "$CLOVERROOT"/Version.h