diff options
author | Mohammad Akhlaghi <mohammad@akhlaghi.org> | 2021-01-03 15:24:08 +0000 |
---|---|---|
committer | Mohammad Akhlaghi <mohammad@akhlaghi.org> | 2021-01-03 15:24:08 +0000 |
commit | daeb41ba00427d28e22169381bc21b1ad784d087 (patch) | |
tree | 8a3267559a0f5c8dc63fae16ae2bc65d8ab6715e /reproduce/analysis/make/initialize.mk | |
parent | 281ad23c2218560bcdfe3e76cf61f4901f76b257 (diff) | |
parent | b1bd282bc3bcd11573fc064edfbab1bd65564348 (diff) |
Imported recent updates in Maneage, minor conflicts fixed
There were only three very small conflicts that have been fixed.
Diffstat (limited to 'reproduce/analysis/make/initialize.mk')
-rw-r--r-- | reproduce/analysis/make/initialize.mk | 30 |
1 files changed, 24 insertions, 6 deletions
diff --git a/reproduce/analysis/make/initialize.mk b/reproduce/analysis/make/initialize.mk index 0cc04ee..4bae0a4 100644 --- a/reproduce/analysis/make/initialize.mk +++ b/reproduce/analysis/make/initialize.mk @@ -1,6 +1,6 @@ # Project initialization. # -# Copyright (C) 2018-2020 Mohammad Akhlaghi <mohammad@akhlaghi.org> +# Copyright (C) 2018-2021 Mohammad Akhlaghi <mohammad@akhlaghi.org> # # This Makefile is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -491,13 +491,31 @@ $(mtexdir)/initialize.tex: | $(mtexdir) # Calculate the latest Maneage commit used to build this # project: + # - The project may not have the 'maneage' branch (for example + # after cloning from a fork that didn't include it!). In this + # case, we'll print a descriptive warning, telling the user what + # should be done (reporting the last merged commit and its date + # is very useful for the future). # - The '--dirty' option (used in 'project-commit-hash') isn't # applicable to "commit-ishes" (direct quote from Git's error # message!). - # - The project may not have the 'maneage' branch (for example - # 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}') + if git log maneage -1 &> /dev/null; then + c=$$(git merge-base HEAD maneage) + v=$$(git describe --always --long $$c) + d=$$(git show -s --format=%aD $$v | awk '{print $$2, $$3, $$4}') + else + echo + echo "WARNING: no 'maneage' branch found! Without it, the latest merge of " + echo "this project with Maneage can't be reported in the paper (which is bad " + echo "for your readers; that includes yourself in a few years). Please run " + echo "the commands below to fetch the 'maneage' branch from its own server " + echo "and remove this warning (these commands will not affect your project):" + echo " $ git remote add origin-maneage http://git.maneage.org/project.git" + echo " $ git fetch origin-maneage" + echo " $ git branch maneage --track origin-maneage/maneage" + echo + v="\textcolor{red}{NO-MANEAGE-BRANCH (see printed warning to fix this)}" + d="\textcolor{red}{NO-MANEAGE-DATE}" + fi echo "\newcommand{\maneagedate}{$$d}" >> $@ echo "\newcommand{\maneageversion}{$$v}" >> $@ |