views:

51

answers:

1

Ok, I get the incremental build and I'm working on it already, but I don't got the idea how to do rollbacks in case I need to. At the moment I'm using MSBuild and CruiseControl.NET to create the build system; everything is going smooth right up to the point when I start thinking about rollbacks. How is it achieved using either MSBuild or CruiseControl.NET?

Cheers!

+1  A: 

Check out the previous version of the code, then check it in as a new version. This won't require any change at all to your build system, as it won't see any difference between this and a normal code edit. This also keeps the "unwanted" code change in your source control history so you can retrieve it when you realise that rolling back was also a mistake.

Jason Williams
How do you check out the previous version of the code, and then check it in as a new version from MSBuild or CCNet?
Ostati
It depends on what source control package you're using. They all provide command-line tools that can be used to execute source control commands from within build scripts (i.e. from MSBuild or CC). (But why do you want your incremental build script to roll back your changes? Or am I just not understanding your question?)
Jason Williams
It doesn't have to be my incremental build script to do rollback. I just want to know how people do it. Is it as easy as checking out previous version and checking it back in? Also, is rollback going to be a manual step?
Ostati
Rollback is usually a manual step, as you don't tend to do it often.
Jason Williams
Can it be automated? Does it make sense to automate it at all?
Ostati
It's just a check-out and a check-in. After checking out you should test the code to verify that it is safe to check in, so automating it wouldn't be a very good idea.
Jason Williams