new way to get clover revision by Dids

Signed-off-by: Sergey Isakov <isakov-sl@bk.ru>
This commit is contained in:
Sergey Isakov 2019-10-28 13:22:48 +03:00
parent a2ff20c379
commit 5864939127
3 changed files with 11 additions and 7 deletions

View File

@ -20,7 +20,8 @@ export LC_CTYPE='C'
# ====== REVISION/VERSION ======
declare -r CLOVER_VERSION='v2.5k'
declare -r CLOVER_REVISION=$(git describe --tags $(git rev-list --tags --max-count=1))
# declare -r CLOVER_REVISION=$(git describe --tags $(git rev-list --tags --max-count=1))
declare -r CLOVER_REVISION=$(git describe --tags --abbrev=0)
# ==== CHECK ENVIRONEMENT ====

View File

@ -57,10 +57,11 @@ rem set F_VER_TXT=vers.txt
rem # svnversion -n>%F_VER_TXT%
rem set /P s=<%F_VER_TXT%
rem # del %F_VER_TXT%
git rev-list --tags --max-count=1 > revs.txt
set /p c=< revs.txt
del revs.txt
git describe --tags %c% > vers.txt
rem git rev-list --tags --max-count=1 > revs.txt
rem set /p c=< revs.txt
rem del revs.txt
rem git describe --tags %c% > vers.txt
git describe --tags --abbrev=0 > vers.txt
set /P s=< vers.txt
del vers.txt

View File

@ -453,7 +453,8 @@ MainBuildScript() {
checkCmdlineArguments $@
checkToolchain
local repoRev=$(git describe --tags $(git rev-list --tags --max-count=1))
# local repoRev=$(git describe --tags $(git rev-list --tags --max-count=1))
local repoRev=$(git describe --tags --abbrev=0)
#
# we are building the same rev as before?
@ -574,7 +575,8 @@ MainBuildScript() {
if (( $SkipAutoGen == 0 )) || (( $FORCEREBUILD == 1 )); then
# local clover_revision=$(cat "${CLOVERROOT}/${VERSTXT}")
local clover_revision=$(git describe --tags $(git rev-list --tags --max-count=1))
# local clover_revision=$(git describe --tags $(git rev-list --tags --max-count=1))
local clover_revision=$(git describe --tags --abbrev=0)
local clover_build_date=$(date '+%Y-%m-%d %H:%M:%S')
#echo "#define FIRMWARE_VERSION \"2.31\"" > "$CLOVERROOT"/Version.h