doc: prefix commit hash with branch name

This commit is contained in:
Matthias Ringwald 2021-05-27 16:55:56 +02:00
parent 2816575b06
commit 47f5232850
2 changed files with 4 additions and 2 deletions

View File

@ -3,11 +3,12 @@
# get commit and tag
tag=`git tag --points-at HEAD`
commit=`git rev-parse --short HEAD`
branch=`git branch | sed -n -e 's/^\* \(.*\)/\1/p'`
# use tag if available
if [ -z "$tag" ]
then
version="Commit $commit"
version="$branch-$commit"
else
version="Version $tag ($commit)"
fi

View File

@ -3,11 +3,12 @@
# get commit and tag
tag=`git tag --points-at HEAD`
commit=`git rev-parse --short HEAD`
branch=`git branch | sed -n -e 's/^\* \(.*\)/\1/p'`
# use tag if available
if [ -z "$tag" ]
then
version=$commit
version="$branch-$commit"
else
version=$tag
fi