How can I lookup the latest git commit hash from an ant build script?
I am currently working on a new open source project which I store on github. I would like to extend my existing ANT build file to allow me to create numbered builds. I am imagining that I would launch the build with something like "ant buildnum -Dnum=12".
I would like the resulting jar to have two crucial bits of information in it's manifest file:
- build.number=12
- build.gitcommit=
I know how to create the build.number line. However, I am unsure of the best ant plumbing to lookup the latest git commit hash which is the value I want to fill in for .