Skip to content

Commit

Permalink
check git is available in gitmeta.tex target
Browse files Browse the repository at this point in the history
Add a line checking that the git command is present, i.e. the
make will fail if it's not.  Prevents silent production of an
uninformative gitmeta.tex file in absence of git.

Absence of git may seem like an unlikely eventuality for an
ivoatex build, but it has happened when building documents
from docker.
  • Loading branch information
mbtaylor authored and msdemlei committed Jan 21, 2025
1 parent 4535116 commit e1112d0
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ untag:
.FORCE:

gitmeta.tex: .FORCE
@git log --oneline -0 # check git is present
@/bin/echo -n '\vcsrevision{' > $@
@/bin/echo -n "$(shell git log -1 --date=short --pretty=%h 2> /dev/null)" >> $@
@if [ ! -z "$(shell git status --porcelain -uno 2> /dev/null)" ]; then /bin/echo -n -dirty >> $@; fi
Expand Down

0 comments on commit e1112d0

Please sign in to comment.