chiark / gitweb /
add "-local" to version string when tree is locally modified
authorIan Jackson <ian@liberator.relativity.greenend.org.uk>
Fri, 27 Aug 2010 22:36:18 +0000 (23:36 +0100)
committerIan Jackson <ian@liberator.relativity.greenend.org.uk>
Fri, 27 Aug 2010 22:36:18 +0000 (23:36 +0100)
build-sh

index 2ecb9741cb2ba1cb0d37e4bfdc4c2e77f7cd2236..572996e02398a2458957b299cdc69fa783e28bac 100755 (executable)
--- a/build-sh
+++ b/build-sh
@@ -14,6 +14,10 @@ esac
 export JAVA_HOME
 
 revision=`git describe --always || echo '(unknown revision)'`
+if [ x"`git diff 2>/dev/null || echo x`" != x ]; then
+       revision="$revision-local"
+fi
+
 cat >src/com/tedpearson/ypp/market/Version.java <<END
   package com.tedpearson.ypp.market;
   public class Version {