build.bash: append branch name != master

This commit is contained in:
Jakob Unterwurzacher 2020-04-13 12:35:40 +02:00
parent 210db84e20
commit a2ad14b9ac
1 changed files with 4 additions and 0 deletions

View File

@ -29,6 +29,10 @@ fi
# gocryptfs version according to git or a VERSION file
if [[ -d .git ]] ; then
GITVERSION=$(git describe --tags --dirty)
GITBRANCH=$(git rev-parse --abbrev-ref HEAD)
if [[ -n $GITBRANCH && $GITBRANCH != master ]] ; then
GITVERSION="$GITVERSION.$GITBRANCH"
fi
elif [[ -f VERSION ]] ; then
GITVERSION=$(cat VERSION)
else