Psake: new PowerShell based build tool for .NET
•
Rake: The approach of implementing a build tool in your favorite dynamic language by using blocks or closures was demonstrated by Jim Weirich, the author of Rake. The first working prototype took Jim about an hour:
(from the Rake documentation)
Compare that to writing an XML based tool like NAnt: parsing the XML based build file is enough work, let alone implementing anything else like dependency resolution. Psake in it's present form is under 200 lines of code, and my Ruby 1.8 install of Rake has about 1300 lines of code, with a bunch of new tasks:
Fox:/usr/lib/ruby/site_ruby/1.8/rake jsimpson$ find . -type f -exec cat {} ; | wc -l
1271
Fox:/usr/lib/ruby/site_ruby/1.8/rake jsimpson$
NAnt, by comparison has considerably more. Just one of the files that deals with parsing XML, without tasks is bigger than Rake:
Fox:~/Desktop/nant-0.85/src/NAnt.Core jsimpson$ wc -l Element.cs
1683 Element.cs
Now: size isn't everything, and this post isn't a NAnt bashing post. I'm just trying to illustrate one of the reasons why I think that this tool might go places: it's a very elegant and simple approach that relies on someone else having done 5 years or so of development.
There could be some merit in exposing NAnt or MSBuild tasks in Rake via Iron Ruby. But someone who already uses PowerShell will probably head in that direction.
PowerShell:
Disney and Apple/Microsoft are in the same business: short-circuiting laborious, explicit verbal communication with expensively designed interfaces.
(Neal Stevenson, In the Beginning was the Command Line)
Does anybody else think it's interesting that the other Disneyland of operating systems is slowly making everything scriptable? There's a growing number of Windows applications that you can manage, (interactively or not) from PowerShell. Which could be a huge step above the polyglot of C#, VB, and batch files that people seem to use right now. If PowerShell gains enough ground, it might not make Windows administration so damn hard.
Anyway: check out Psake (and no, it doesn't rhyme with 'make').
Link (via email from Ian Cooper)