diff options
author | Mohammad Akhlaghi <mohammad@akhlaghi.org> | 2020-07-04 22:15:45 +0100 |
---|---|---|
committer | Mohammad Akhlaghi <mohammad@akhlaghi.org> | 2020-07-04 22:15:45 +0100 |
commit | cedea21b101bc1a3af90f0c97b5bb768311630fd (patch) | |
tree | 9eaf8ac0e37afd3f2447d8416c60c64a3790e8f2 /reproduce/analysis/make | |
parent | 6322d4f3961bc4b275707366d9bb2703ab98be79 (diff) |
Commit hash of Maneage branch used to build project as LaTeX macro
To help in the documentation, the Git hash of the Maneage branch commit
that the project has most recently merged with (or branched from) is now
also provided as a LaTeX macro ('\maneageversion').
It is calculated in 'reproduce/analysis/make/initialize.mk' (in the recipe
to 'initialize.tex').
Diffstat (limited to 'reproduce/analysis/make')
-rw-r--r-- | reproduce/analysis/make/initialize.mk | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/reproduce/analysis/make/initialize.mk b/reproduce/analysis/make/initialize.mk index 315be1a..dff5eca 100644 --- a/reproduce/analysis/make/initialize.mk +++ b/reproduce/analysis/make/initialize.mk @@ -465,3 +465,9 @@ $(mtexdir)/initialize.tex: | $(mtexdir) # Version and title of project. echo "\newcommand{\projecttitle}{$(metadata-title)}" > $@ echo "\newcommand{\projectversion}{$(project-commit-hash)}" >> $@ + + # Calculate the latest Maneage commit used to build this + # project. Note that the '--dirty' option isn't applicable to + # "commit-ishes" (direct quote from Git's error message!). + v=$$(git describe --always --long maneage) + echo "\newcommand{\maneageversion}{$$v}" >> $@ |