chiark / gitweb /
pctb: print output from server to stderr too
[jarrg-ian.git] / build-sh
index 1c0a975f1b12620db510f8f1040122fa1a1f9aec..222429695e908c17d4400970252ae6de47ac7dba 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
@@ -44,6 +51,8 @@ pubbase="${JPCTB_PUBLISH_BASE-login.chiark.greenend.org.uk}"
 pubdir="${JPCTB_PUBLISH_DIR-/home/yarrgweb/public-html/download/jpctb}"
 
 echo "
+Revision: $revision
+
 Install with:
- RSYNC_RSH=ssh rsync -vP $files $pubbase:$pubdir/$revision/
+ RSYNC_RSH=ssh rsync -vP $files $pubbase:$pubdir/test/
 "