I have a little private Google code project. For a SCM I use Mercurial. And for the local build i would like to use nant.
So basically:
- I would like to download my source files from a known mercurial repository using a nant task
- I would like to somehow get the revision number of the repository so that I can assemble a nice little assembly version number
The build script will not be used for continuous integration but only for nightly builds and production builds.
Thanks for the help
I don’t know nant, but in (real) ant, we just use the
<exec>task to invoke the hg binary. Depending clean you’d like to start you cancloneor justpulland executinghg id -igets you the revision number cleanly. Another thing to consider is using the archive links on the remote web interface (essentially the hg archive command via HTTP) and just use wget (not the equivalent nant task) to pull down the tip archive, which has an easy consistent link, and then you can get the revision id from inside the archive’shg_archival.txtfile.