chiark / gitweb /
add "-local" to version string when tree is locally modified
[jarrg-ian.git] / build-sh
index a58670428bcec4f3d8ec0e162e816a5927daa85f..572996e02398a2458957b299cdc69fa783e28bac 100755 (executable)
--- a/build-sh
+++ b/build-sh
@@ -14,12 +14,19 @@ 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 {
       public final static String version = "$revision";
   }
 END
+rm -f src/build/com/tedpearson/ypp/market/Version.class
+rm -f src/build/com/tedpearson/ypp/market/ControlPanel.class
+rm -f *.jar
 
 cd src
 ant -f PCTB.xml