Software dev, tech, mind hacks and the occasional personal bit

Month: November 2008

Green & Red Local Builds (adding colour to the local build process)

build.JPGWell, who doesn’t write tests and do continuous integration (CI) these days? Whether you use one of the many Cruise Control variants, or Team City or some other tool, you most likely get a handy colour coding of builds as either green or red (ie, good, or bad). But, you can take this a step further!

redbuild.JPGOften on .NET projects, we have a little batch file that we run before checking in (often with a pause at the end so it can be run from a shortcut), to confirm that no tests are broken locally. Well, it’s not much fun peering at the ugly Nant output (or whatever build system you use). Instead, it is quite easy to add a couple of lines to your batch file and change the colour of the console to bright Red or bright Green depending on the success of the local build. It is great for telling what the result was at a glance. I can’t claim credit the idea – it was something we used at EDI for our custom build system, but here’s some batch file code I whipped up which I can claim is all mine, every last GOTO of it! Enjoy 🙂

The following code uses NAnt, but you can replace it with MsBuild or any other build tool that returns a status code.

@echo off

color 07

tools\\nant\\NAnt.exe -buildfile:mybuild.build %*

IF ERRORLEVEL 1 goto RedBuild
IF ERRORLEVEL 0 goto GreenBuild

:RedBuild
color 4F
goto TheEnd

:GreenBuild
color 2F

:TheEnd
pause

Cook Islands Holiday

The Cook Islands are an awesome place to visit to chill out and relax. We stayed there for two weeks and had a great time, coming back much refreshed. We only visited Rarotonga, the largest island which has about 14,000 people, and a coast line of around 32km. Basically it is a volcanic island surrounded by a large, shallow reef with bath-water warm water and lots of little uninhabited motu (islands) to explore. Around the edge of the island are beaches and flat land where people live, usually in houses with large gardens, lots of coconut and mango trees, and vivid tropical plants. In the middle of the island are tall mountains covered in jungle. It is a great place for water-sports such as kayaking, fishing, swimming and snorkelling, and there’s also some fairly hard core walking tracks to explore in the jungle. Prices are reasonable, though food tends to be quite expensive as most of it comes in from New Zealand. The Cook Islanders maintain their culture very strongly and put on enjoyable performances and feasts that you can attend (often called “Island Nights”).

Cook Islands Fruits of Rarotonga

Cook Islands Water

Cook Islands Motu

Cook Islands Sunrise

Cook Islands

Our Feet

Cook Islands Jungle

Soosun of the Jungle

Cook Islands traditional dancing

Cook Islands beach at sunset

Also, more Cook Islands photos here.

Powered by WordPress & Theme by Anders Norén