version/gitvars: use redo-always if using git commands.
Otherwise we won't rebuild files when the commit id changes.
This commit is contained in:
parent
c077d77285
commit
5ea0cb01f5
2 changed files with 6 additions and 1 deletions
|
|
@ -1 +1,2 @@
|
|||
rm -f *~ .*~ *.1 md-to-man
|
||||
rm -f *~ .*~ *.1 md-to-man *.tmp
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
redo-ifchange gitvars.pre prodname
|
||||
|
||||
read PROD <prodname
|
||||
exec >$3
|
||||
|
||||
# Fix each line from gitvars.pre where git may or may not have already
|
||||
# substituted the variables. If someone generated a tarball with 'git archive',
|
||||
|
|
@ -12,6 +13,7 @@ while read line; do
|
|||
x=${line#\$Format:} # remove prefix
|
||||
if [ "$x" != "$line" ]; then
|
||||
# git didn't substitute it
|
||||
redo-always # git this from the git repo
|
||||
x=${x%\$} # remove trailing $
|
||||
if [ "$x" = "%d" ]; then
|
||||
tag=$(git describe --match="$PROD-*")
|
||||
|
|
@ -22,3 +24,5 @@ while read line; do
|
|||
fi
|
||||
echo "$x"
|
||||
done <gitvars.pre
|
||||
|
||||
redo-stamp <$3
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue