ADD: set correct git toplevel directory

This commit is contained in:
Dominik Meyer 2021-07-06 17:36:07 +02:00
parent a470e662ac
commit dbd138f09d
1 changed files with 4 additions and 1 deletions

View File

@ -10,6 +10,9 @@
FIRSTTAG=$(git describe --tags --always --dirty='-*' 2>/dev/null) FIRSTTAG=$(git describe --tags --always --dirty='-*' 2>/dev/null)
# Get the first tag in history that looks like a Release # Get the first tag in history that looks like a Release
RELTAG=$(git describe --tags --long --always --dirty='-*' --match '[0-9]*.*' 2>/dev/null) RELTAG=$(git describe --tags --long --always --dirty='-*' --match '[0-9]*.*' 2>/dev/null)
# Get toplevel directory
GITDIR=$(git rev-parse --show-toplevel)
# Hoover up the metadata # Hoover up the metadata
git --no-pager log -1 --date=short --decorate=short \ git --no-pager log -1 --date=short --decorate=short \
--pretty=format:"\usepackage[% --pretty=format:"\usepackage[%
@ -28,4 +31,4 @@ git --no-pager log -1 --date=short --decorate=short \
refnames={%d}, refnames={%d},
firsttagdescribe={$FIRSTTAG}, firsttagdescribe={$FIRSTTAG},
reltag={$RELTAG} reltag={$RELTAG}
]{gitexinfo}" HEAD > .git/gitHeadInfo.gin ]{gitexinfo}" HEAD > ${GITDIR}/.git/gitHeadInfo.gin