Thursday, November 09, 2006

Nant Runner/Console

I seem to be accumulating a lot of NAnt files which require arbitrary periodic running...
I was thinking the other night about how many NAnt files I seem to have with targets which do highly useful things when run without requiring any params.

GoMakeMeACoffee <-- yeah I wish

It occurred to me that it would be really good if I had a sort of dos-box *interactive* nant console application.

This app would be launched with an optional list of build files.

I could interactively ask it to load further build files and then I could execute targets by name.

So I could just Type the name of a target and it would run.

Sounds like something PowerShell could do.

or perhaps just a simple .net console app.

I've never made an interactive console app before (I guess you might call this a shell of sorts)

Can someone point me in the direction of a small example?

What do ya'll think of this as an idea anyway?

NantShell.... yeah I like the sound of that


Jay Flowers said...

You should see these posts:

Rory said...

I can see how this would work quite well for you.

For my purposes, I find I am collecting many targets in only 2-3 files and therefore default targets do not really serve me very well.

My idea allows for the console (or similar app) to maintaina sort of environment or path of sorts which would consist of a list of scripts.

The interactive aspect would then be able to respond to a request to run a single target by searching through the scripts for a suitable target and then executing it.

In truth I could seperate each of these Targets into either seperate files and then "include" the bits they need or alternatively create batch files. but that all seems like such hard work

I'd like to be able to use CR!(CodeRush) to very quickly knock out a new target, and then be able to issue a command to my console and have it work immediately.

The console needn't even load the scripts into permanent memory. I suspect that it would only trigger the appropriate build script and target on demand.

It would effectively index the target based contents of its script list.
Perhaps it could have a built in command to list all targets in the scriptlist and another to reindex.

Perhaps the scriptlist could include path's and filespecs to treat like files, which would allow one to just specify a list of directories in which scrips could be found.

These for now however are all just thoughts blowing through my head :)

I might even get around to doing some of it one day.

Perhaps it might even make a good CodeRush ToolWindow Addin :)

Sorry for the strange out pouring of crap onto your screen here. I pretty much type as I think and that leaves me very little time for tidying up said thoughts or correcting my spolling :P