From 22b2aba490425080e817d91543dec5f6c8913eec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Lesimple?= Date: Mon, 31 Aug 2020 22:11:20 +0200 Subject: [PATCH] fix: windows: flavor in build.h was always UNKNOWN --- scripts/time-stamper.bash | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/scripts/time-stamper.bash b/scripts/time-stamper.bash index a03ed98..6c7820a 100755 --- a/scripts/time-stamper.bash +++ b/scripts/time-stamper.bash @@ -1,17 +1,21 @@ #!/usr/bin/env bash build=$(grep BUILDNUM $1 2>/dev/null | cut -d\ -f3) build=$((build+1)) -flavor=$(grep FLAVOR $1 2>/dev/null | cut -d\ -f3) -if [ -z "$flavor" ]; then - flavor=UNKNOWN -fi -echo "#define FLAVOR $flavor" >$1 +cat >$1 <>$1 if git describe >/dev/null 2>/dev/null; then gitver=$(git describe --tags --dirty) - echo "#define BUILD \"$gitver-$flavor-speed47.build$build\"" >>$1 + echo "#define BUILD \"$gitver-\" TOSTRING(FLAVOR) \"-speed47.build$build\"" >>$1 else - echo "#define BUILD \"$flavor-speed47.build$build\"" >>$1 + echo "#define BUILD TOSTRING(FLAVOR) \"-speed47.build$build\"" >>$1 fi date=$(date +"%d.%m.%y (%A, %H:%M)") echo "#define BDATE \"$date\"" >>$1