chiark / gitweb /
check output from yarrg is as we expect
[jarrg-ian.git] / build-sh
index 4613ba5..3aae4b2 100755 (executable)
--- a/build-sh
+++ b/build-sh
@@ -13,30 +13,46 @@ esac
 : ${JAVA_HOME:=/usr/lib/jvm/java-6-sun}
 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
+ant -f Jarrg.xml
 cd ..
 
 echo "
 Building tarball
 "
 
-GZIP=-9v tar --exclude=\*{~,.tar.gz,.exe} --exclude='#*#' \
-  --transform='s/^./jpctb/' --exclude=jpctb/{src/build,tmp} \
-  -zcf jpctb.tar.gz .
+GZIP='-9v --rsyncable' tar --exclude=\*{~,.tar.gz,.exe} --exclude='#*#' \
+  --transform='s/^./jarrg/' --exclude=jarrg/{src/build,tmp} \
+  -zcf jarrg.tar.gz .
 
-files='jpctb.tar.gz jpctb-setup.exe'
+files='jarrg.tar.gz jarrg-setup.exe'
 
 echo "
 Generated OK:
 "
 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`
+pubbase="${JARRG_PUBLISH_BASE-login.chiark.greenend.org.uk}"
+pubdir="${JARRG_PUBLISH_DIR-/home/yarrgweb/public-html/download/jarrg}"
 
 echo "
+Revision: $revision
+
 Install with:
- RSYNC_RSH=ssh rsync -vP $files $pubbase:$pubdir/$revision/
+ RSYNC_RSH=ssh rsync -vP $files $pubbase:$pubdir/test/
 "