I have recently started branching my code out for multiple customers, and I needed an easy way for the Project Managers to be able to see more info about the deliverables, and be able to send that data back to me for bugfixes, feature requests, etc…
I’ve been using Ant for a while, it’s great for packaging up my Flash/AS2 applications, without including the .as, .fla, swd, etc.. files. And since so many java devs use SVN, I knew there had to be some sort of integration between the two. I eventually stumbled upon SVNANT, but was unable to get the 1.0.0 working on my machine. I found many references to 1.1.0, however, so I downloaded the source and compiled it (Thanks to Jeff at Alagad). This worked right away for me, so with the help of this post from Howard Scholtz, I was able to add in revsion #/time directly into the app without using svn keywords!
Code included after the break.
This is the target I use in the build.xml file, it’s pretty generic, you should be able to drop it in and it will work, as long as you are using APP_ROOT.
Build Number ${build.number} ${build.time}
Revision Number: ${build.lastChangedRev}/${build.revision} committed on: ${build.lastChangedDate}
Here’s my Version.as file:
// Version Information
public var build_number:String="@buildnumber@";
public var build_time:String="@buildtime@";
public var revision_number:String="@revisionnumber@";
public var revision_time:String="@revisiontime@";
0 comments ↓
There are no comments yet...Kick things off by filling out the form below.
You must log in to post a comment.