Improve git-version-stamp's error messages
This commit is contained in:
parent
f9a3b97b50
commit
256ecd4d8e
|
@ -7,17 +7,19 @@
|
||||||
|
|
||||||
die()
|
die()
|
||||||
{
|
{
|
||||||
echo "$0: WARNING: version stamp update failed."
|
echo "$0: WARNING: version stamp update failed: $1."
|
||||||
#exit 1 # not important enough to stop the build.
|
#exit 1 # not important enough to stop the build.
|
||||||
exit 0
|
exit 0
|
||||||
}
|
}
|
||||||
|
|
||||||
STAMP=`cat "$1" 2> /dev/null`
|
STAMP=`cat "$1" 2> /dev/null`
|
||||||
CURRENT=`git describe --dirty 2>/dev/null`
|
if [ -z "$STAMP" ]; then
|
||||||
|
die "Missing STAMP: $1"
|
||||||
|
fi
|
||||||
|
|
||||||
if [ -z "$STAMP" -o -z "$CURRENT" ]
|
CURRENT=`git describe --dirty 2>/dev/null`
|
||||||
then
|
if [ -z "$CURRENT" ]; then
|
||||||
die
|
die "git describe failed: $(git describe --dirty)."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$STAMP" != "$CURRENT" ]
|
if [ "$STAMP" != "$CURRENT" ]
|
||||||
|
|
Loading…
Reference in New Issue