posted on Saturday, August 13, 2005 9:53 AM by richardSlade

The need for a better build script

My build script is just too verbose. In fact, I am generally too verbose but that's another story. The other day I came to add a new project to my Nant build script and I realised what I had been putting off. My build script just isn't that great. Hey, I'm not saying it's awful but it could do with some tidying up.

When I put together our continuous integration server I was like a kid with a new toy, but quickly found how few examples there are of how to correctly write a really good build script and even more importantly, how long it seems to take to get a good one going.

Currently, my build script for my current project performs the following tasks, all quite simple:

  • Runs all unit tests -that depends on
  • Build each project - that depends on
  • Get latest version from scource safe - that depends on
  • Clean and make directories

The solution isn't huge, about 17 projects at the moment, but there are no settable properties in the build script and I need to change it if I want to build in release mode. It all works pretty well on a daily basis and each developer uses CCTRAY so everyone can see who breaks the build, and when (ok, it was my fault last time), BUT, it could be a lot better. I'd like to hear from people on experiences with Nant and Cruise Control.NET. It would be great to get some definative "this is the way to structure a build script" examples.

the next step will be to add more tasks to the build so it will automatically deploy to a staging server when each build passes.

Cheers

R

Comments