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

Include git hash in PDF #213

Merged
merged 6 commits into from
Jan 17, 2017
Merged

Include git hash in PDF #213

merged 6 commits into from
Jan 17, 2017

Conversation

axic
Copy link
Member

@axic axic commented Jan 12, 2017

Fixes #78.

@axic
Copy link
Member Author

axic commented Jan 12, 2017

If #214 is merged, we could add this to the section:

This version was generated based on the commit \YellowPaperVersionNumber{} on \YellowPaperBuildTimestamp}

Copy link
Contributor

@chriseth chriseth left a 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.

@axic
Copy link
Member Author

axic commented Jan 12, 2017

@chriseth do you mean having the date in the title? Would it be part of \YellowPaperVersionNumber and thus result in unknown version if no git repo is available? If so what date format? (YYYY/MM/DD)

unknown version plus a date might not fit into the title well if you consider it is duplicated as the header on every page, but this might fit well into #214.

@axic
Copy link
Member Author

axic commented Jan 12, 2017

This fits as the header on the pages:

ETHEREUM: A SECURE DECENTRALISED GENERALISED TRANSACTION LEDGER EIP-150 REVISION (d6b72f7 - 2017-01-12)

@chriseth
Copy link
Contributor

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
Copy link
Member

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.

Copy link
Member Author

@axic axic Jan 12, 2017

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.

@axic
Copy link
Member Author

axic commented Jan 12, 2017

@chriseth @pirapira added build date (YYY-MM-DD of the HEAD commit) and it falls back to unknown without a repo.

if [ -d ".git" ]; then

SHA=`git rev-parse --short --verify HEAD`
DATE=`git show -s --format="%cd" --date="format:%Y-%m-%d" HEAD`
Copy link
Member Author

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?

Copy link
Member Author

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.

Copy link
Member

@pirapira pirapira left a 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.

@pirapira pirapira merged commit a2ea19e into ethereum:master Jan 17, 2017
@axic axic deleted the revision-in-output branch January 17, 2017 14:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants