From d548d8f3a645170c65178f9a34175c1e7cb434ac Mon Sep 17 00:00:00 2001 From: Liam Girdwood Date: Wed, 21 Nov 2018 17:15:14 +0000 Subject: [PATCH] Revert "scripts: add local version number file" --- .gitignore | 1 + .tarball-version | 1 - version.sh | 12 ++++-------- 3 files changed, 5 insertions(+), 9 deletions(-) delete mode 100644 .tarball-version diff --git a/.gitignore b/.gitignore index f940e7edf..b2891b4d6 100644 --- a/.gitignore +++ b/.gitignore @@ -15,6 +15,7 @@ *.rom *.man .version +.tarball-version *.x .build *.dis diff --git a/.tarball-version b/.tarball-version deleted file mode 100644 index f367bd89e..000000000 --- a/.tarball-version +++ /dev/null @@ -1 +0,0 @@ -v1.1-185-g3507 diff --git a/version.sh b/version.sh index cb133b874..76a522e89 100755 --- a/version.sh +++ b/version.sh @@ -15,18 +15,14 @@ fi GIT_TAG=`git describe --abbrev=4 2>/dev/null` # may fail to get git describe in some case, add this fallback to handle error -if [[ "x$GIT_TAG" == "x" ]]; then - if [ -e $DIR/.tarball-version ]; then - VER=$(cat $DIR/.tarball-version) - echo $VER > $DIR/.version - else - GIT_TAG="v0.0-0-g0000" - fi +if [[ "x$GIT_TAG" == "x" ]] +then + GIT_TAG="v0.0-0-g0000" fi # Some releases have a SOF_FW_XXX_ prefix on the tag and this prefix # must be stripped for usage in version.h. i.e. we just need the number. -if [ $(expr match "$GIT_TAG" 'SOF_FW_[A-Z]+_' ) -lt 15 ]; then +if [ $(expr match $GIT_TAG 'SOF_FW_[A-Z]+_' ) -lt 15 ]; then VER=`echo $GIT_TAG | cut -d_ -f4` else VER=$GIT_TAG