summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYves Orton <demerphq@dromedary.booking.com>2008-12-21 19:40:18 +0100
committerYves Orton <demerphq@dromedary.booking.com>2008-12-27 11:18:09 +0100
commit10275c29786c111a7eacbb751ea7e0ba257dc869 (patch)
tree58b9808a6db318d2cb12e18bec2ed7212cfe097b
parentba4bb01ebc0497918a1b1428e4135e7b0e9c40b6 (diff)
downloadperl-10275c29786c111a7eacbb751ea7e0ba257dc869.tar.gz
slightly smarter make_patchnum logic, detect if there are changes to the working directory so we dont lie about our version
-rw-r--r--make_patchnum.sh5
1 files changed, 5 insertions, 0 deletions
diff --git a/make_patchnum.sh b/make_patchnum.sh
index d3c94411ae..2746840e95 100644
--- a/make_patchnum.sh
+++ b/make_patchnum.sh
@@ -4,7 +4,12 @@ Existing=`cat .patchnum 2>/dev/null`
if [ -e ".patch" ]; then
Current=`awk '{print $4}' .patch`
else
+ # we should do something better here
Current=`git describe`
+ Changed=`git diff-index --name-only HEAD`
+ if [ -n "$Changed" ]; then
+ Current="$Current-with-uncommitted-changes"
+ fi
fi
if [ "$Existing" != "$Current" ]; then