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

View File

@ -29,6 +29,10 @@ fi
# gocryptfs version according to git or a VERSION file # gocryptfs version according to git or a VERSION file
if [[ -d .git ]] ; then if [[ -d .git ]] ; then
GITVERSION=$(git describe --tags --dirty) 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 elif [[ -f VERSION ]] ; then
GITVERSION=$(cat VERSION) GITVERSION=$(cat VERSION)
else else