Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added variable to get the full path of the .git directory #31

Open
wants to merge 1 commit into
base: CTAN
Choose a base branch
from
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