diff options
author | Mohammad Akhlaghi <mohammad@akhlaghi.org> | 2020-12-01 11:43:04 +0000 |
---|---|---|
committer | Mohammad Akhlaghi <mohammad@akhlaghi.org> | 2020-12-01 11:43:04 +0000 |
commit | ac8eee90b1580fb566ee5b84fef9acb4ed437c01 (patch) | |
tree | 5d0bcc2d1779d1e6333f11fff41d9d59c14f16a1 /reproduce/analysis/make | |
parent | 6ca2fbf925d14fff862889840913e3c89ea8048a (diff) |
Default paper: macros available for date of commits cited
Until now, Maneage only provided the commit hashes (of the project and
Maneage) as LaTeX macros to use in your paper. However, they are too
cryptic and not really human friendly (unless you have access to the Git
history on a computer).
With this commit, to make things easier for the readers, the date of both
commits are also available as LaTeX macros for use in the paper. The date
of the Maneage commit is also included in the acknowledgements.
Also, the paragraph above the acknowledgements has been updated with better
explanation on why adding this acknowledgement in the science papers is
good/necessary.
Diffstat (limited to 'reproduce/analysis/make')
-rw-r--r-- | reproduce/analysis/make/initialize.mk | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/reproduce/analysis/make/initialize.mk b/reproduce/analysis/make/initialize.mk index 7217f0c..3649fd2 100644 --- a/reproduce/analysis/make/initialize.mk +++ b/reproduce/analysis/make/initialize.mk @@ -482,7 +482,9 @@ $(mtexdir)/initialize.tex: | $(mtexdir) # commands are run every time with './project make', it is annoying # to print them on the standard output every time. With the '@', # make will not print the commands that it runs in this recipe. - @echo "\newcommand{\projecttitle}{$(metadata-title)}" > $@ + @d=$$(git show -s --format=%aD HEAD | awk '{print $$2, $$3, $$4}') + echo "\newcommand{\projectdate}{$$d}" > $@ + echo "\newcommand{\projecttitle}{$(metadata-title)}" >> $@ echo "\newcommand{\projectversion}{$(project-commit-hash)}" >> $@ # Calculate the latest Maneage commit used to build this @@ -494,4 +496,6 @@ $(mtexdir)/initialize.tex: | $(mtexdir) # after cloning from a fork that didn't include it!). In this # case, we'll just return the string a clear string. v=$$(git describe --always --long maneage) || v=maneage-ref-missing + d=$$(git show -s --format=%aD $$v | awk '{print $$2, $$3, $$4}') + echo "\newcommand{\maneagedate}{$$d}" >> $@ echo "\newcommand{\maneageversion}{$$v}" >> $@ |