[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

svnant and the HEAD version #

From: Andrew Kappen <akappen_at_yahoo.com>
Date: 2004-07-13 00:39:16 CEST

Is there any way for svnant to retrieve the HEAD revision number into an ant property (or
something similar)? My team wants to append distribution files with the Subversion repository
revision number appended (ie. webapp_2323.war). The intent is to make obvious the revision used
to build a given distributable.

One solution that comes to mind is very ugly:
- use the subversion post-commit hook script the write out and commit a java properties file
containing something like: build.version=2323
- use ant to load this file into ant properties and use build.version in the distributable
filenames

This smells bad to me for a few reasons. There will be two commits for every user commit. The
hacked together nature of the solution does not give me confidence in the build process. It seems
like there should be a way to retrieve this kind of basic repository data through svnant... such a
deficiency makes me wonder if I'm not overlooking something obvious!

Thanks!

                
__________________________________
Do you Yahoo!?
New and Improved Yahoo! Mail - Send 10MB messages!
http://promotions.yahoo.com/new_mail
Received on Tue Jul 13 08:39:16 2004

This is an archived mail posted to the Subclipse Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.