From ac8eee90b1580fb566ee5b84fef9acb4ed437c01 Mon Sep 17 00:00:00 2001 From: Mohammad Akhlaghi Date: Tue, 1 Dec 2020 11:43:04 +0000 Subject: 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. --- reproduce/analysis/make/initialize.mk | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'reproduce/analysis/make') 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}" >> $@ -- cgit v1.2.1