X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~yarrgweb/git?p=jarrg-ian.git;a=blobdiff_plain;f=build-sh;h=3aae4b23d512d61beadcc65df5586bede739081c;hp=eb3d1e2e2da1e38324cfa60e0ddfcc96b3670839;hb=b1b517d0db9bcb15127dc1415238bfe1a9366b50;hpb=21094459ba3d050f011c0c7d7dff52ab488526c4 diff --git a/build-sh b/build-sh index eb3d1e2..3aae4b2 100755 --- a/build-sh +++ b/build-sh @@ -5,7 +5,7 @@ set -e case "$#.$1" in -0) ;; +0.) ;; *.-*) echo >&2 'no options allowed'; exit 1;; *) echo >&2 'no arguments allowed'; exit 1;; esac @@ -13,28 +13,46 @@ esac : ${JAVA_HOME:=/usr/lib/jvm/java-6-sun} export JAVA_HOME -(set -e; cd src; ant -f PCTB.xml) +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 <