Stuart Barlow wrote: > > What is the best way in ant to read in a build number from a file and > increment it by one? > > And maybe to write that number back out to the file again?
It would certainly be nice. I've been using a shell script called from build.sh, invoking Ant with the parameter -Dbuild=`incBuild.sh`. #!/bin/sh # incBuild.sh [ ! -e BUILD_STAMP ] && touch BUILD_STAMP x=`cat BUILD_STAMP` [ "$x" = "" ] && x=1 x=`expr $x + 1` echo $x > BUILD_STAMP echo $x --Jeff > Do I need to write my own task? > > Thanks > --------------------------------------------------------------------------- > Stuart Barlow > +44 131 468 8205
