Revert "scripts: add local version number file"

This commit is contained in:
Liam Girdwood 2018-11-21 17:15:14 +00:00 committed by GitHub
parent 3ce2d070f3
commit d548d8f3a6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 9 deletions

1
.gitignore vendored
View File

@ -15,6 +15,7 @@
*.rom
*.man
.version
.tarball-version
*.x
.build
*.dis

View File

@ -1 +0,0 @@
v1.1-185-g3507

View File

@ -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