chiark / gitweb /
try to hit the build over the head to get the version number right
[jarrg-ian.git] / build-sh
index d4687dcc99401570ec92bc8f53bed0f6a0d5a962..1496b6462b6e9c9806a7e366a562a351d1f9a463 100755 (executable)
--- a/build-sh
+++ b/build-sh
@@ -13,6 +13,16 @@ esac
 : ${JAVA_HOME:=/usr/lib/jvm/java-6-sun}
 export JAVA_HOME
 
+revision=`git describe --always || echo '(unknown revision)'`
+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 *.jar
+
 cd src
 ant -f PCTB.xml
 cd ..
@@ -34,9 +44,8 @@ ls -al $files
 
 pubbase="${JPCTB_PUBLISH_BASE-login.chiark.greenend.org.uk}"
 pubdir="${JPCTB_PUBLISH_DIR-/home/yarrgweb/public-html/download/jpctb}"
-revision=`git describe --always`
 
 echo "
 Install with:
- RSYNC_RSH=ssh rsync -vP $files $pubbase:$pubdir/$revision/
+ RSYNC_RSH=ssh rsync -vP $files $pubbase:$pubdir/test/
 "