Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion post-xxx-sample.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
FIRSTTAG=$(git describe --tags --always --dirty='-*' 2>/dev/null)
# Get the first tag in history that looks like a Release
RELTAG=$(git describe --tags --long --always --dirty='-*' --match '[0-9]*.*' 2>/dev/null)
# Get the path where gitHeadInfo.gin shall be put
GINDIR=$(git rev-parse --git-dir 2>/dev/null)
# Hoover up the metadata
git --no-pager log -1 --date=short --decorate=short \
--pretty=format:"\usepackage[%
Expand All @@ -28,4 +30,4 @@ git --no-pager log -1 --date=short --decorate=short \
refnames={%d},
firsttagdescribe={$FIRSTTAG},
reltag={$RELTAG}
]{gitexinfo}" HEAD > .git/gitHeadInfo.gin
]{gitexinfo}" HEAD > $GINDIR/gitHeadInfo.gin
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"$GINDIR" should be used, to allow for path with spaces