From 83fec1559716d5a06137b43848abc18c244bc9e6 Mon Sep 17 00:00:00 2001 From: Liam Girdwood Date: Thu, 11 Jan 2018 12:10:03 +0000 Subject: [PATCH] build: fix version script to use correct version in tarball build make sure the tarball build and worktree build uses the correct version. Signed-off-by: Liam Girdwood --- version.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/version.sh b/version.sh index 1f57c5350..4f25ecd0b 100755 --- a/version.sh +++ b/version.sh @@ -10,8 +10,8 @@ else DIR=$1 fi -# create git version if we are a git repo -if [ ! -d $DIR/.git ]; then +# create git version if we are a git repo or git worktree +if [ -e $DIR/.git -o -d $DIR/.git ]; then # version for make dist git describe --abbrev=4 > $DIR/.version git describe --abbrev=4 > $DIR/.tarball-version @@ -19,7 +19,7 @@ if [ ! -d $DIR/.git ]; then # git commit for IPC echo "#define REEF_TAG \"`git log --pretty=format:\"%h\" -1 | cut -c1-5`\"" > $DIR/src/include/version.h else - echo "#define REEF_TAG 0" > $DIR/src/include/version.h + echo "#define REEF_TAG \"0\"" > $DIR/src/include/version.h fi # build counter