I have beeen working on a little ColdFusion application at work that will allow us to quickly create builds of our applications and move them to the dev/staging server for us to prepare for testing by our QA team. I have to admit I put off learning Ant for a long time but now I am SO glad that I did.
I got started playing with Ant based on a suggestion from Sean Corfield. I was asking Sean if there were any ways to checkout a copy of the latest code from Subversion and copy it to our dev server without having to do it manually and he quickly pointed me to Ant.So this little application Im calling AntFarm houses configurations of all of our projects and allows you to quickly create builds and deploy them. Its actually coming in quite handy since we have multiple developers all contributing to the same projects in subversion. Here are the features so far:
- Holds configs for multiple projects
- Checks code out from your subversion repository based on the project
- Cleans up the code removing and unwanted files like .project files that somehow always find their way into subversion
- Dynamically creates the version for the project and appends the subversion revision number to the build
- Creates a tag in your subversion repository named with the appropriate version
- Deploys the code to your deployment path (currently only works on local and mapped directories)
- The project list shows you the latest build version and allows you to open the ant log for that build.
- Allows use of your own custom build files or use the prepackaged one
Thats about all I can think of for now. Im really wanting to release this as opensource for everyone to modify as they see fit but I have to make sure that my boss doesnt mind since some of it was written on company time. Im sure he will be ok with it.
Its written on CF7 using Fusebox 5 so you will need to install the Fusebox framework as well as the latest version of ant in order to run it.
Heres a little snippet from the build.xml file that I will include with AntFarm. This gets the revision of the checked out code and then writes that to a file. Then I use the REPLACE task to replace that revision number with the full buildversion property. Its really quite nat!
And thats really all there is to that. I will post somemore tomorrow once I make sure its ok to release it.