-
Notifications
You must be signed in to change notification settings - Fork 522
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
Include git hash in PDF #213
Conversation
If #214 is merged, we could add this to the section:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we also add the commit date - which is much more human-friendly? Also, compiling the paper should still be possible without having git available. So perhaps we only \input
Version.tex
if it exists, define \YellowPaperVersionNumber
to "unknown version"
and then \renewcommand
it in Version.tex
.
@chriseth do you mean having the date in the title? Would it be part of
|
This fits as the header on the pages:
|
I guess it is fine to just put it on the first page. |
bibtex Paper | ||
pdflatex -interaction=errorstopmode -halt-on-error Paper.tex | ||
pdflatex -interaction=errorstopmode -halt-on-error Paper.tex | ||
pdflatex -interaction=errorstopmode -halt-on-error Paper.tex |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think these command should be concatenated with && \
. Then, if one of the commands fail, Travis can notice.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moved the build part to #220 and fixed it there. That PR can be merged I guess right now, while this might need some adjustments.
if [ -d ".git" ]; then | ||
|
||
SHA=`git rev-parse --short --verify HEAD` | ||
DATE=`git show -s --format="%cd" --date="format:%Y-%m-%d" HEAD` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This apparently is not supported on every git
version. Any ideas how to nicely find out the commit date?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
git --date=short
does the trick.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me.
Fixes #78.