Bit of a critical one - the only way <ccupdate>
actually "works" is if you set graphical to "true".
The problem is the other "path" of non-graphical is
hardcoded to have a "-print" argument appended, which
simply produces a preview file. Not particularly
useful for most people - and we are trying to avoid
having interactive GUI dialogs popping up on the build
server for obvious reasons.
To fix, I added the following changes to Update.cs:
private bool _print;
/// <summary>
/// Specifies when doing non-graphical updates whether
to just do a preview or actually perform the update.
/// </summary>
[TaskAttribute("print")]
public bool Print
{
get { return _print; }
set { _print = value; }
}
Then in CommandSpecificArguments:
if (Graphical) {
arguments.Append("-graphical ");
} else {
if (Print) {
arguments.Append("-print ");
}
arguments.Append("-force ");
I also made one more VERY useful change in the same
method to prevent the build logs from getting filled
with useless messages from ClearTool (particularly
annoying warning messages about creating the .updt
file too)
if (!this.Verbose)
{
Log(Level.Info, "Output for ccupdate task
suppressed.");
this.Threshold = Level.None;
}
That way if you really do want to see all the path
information just set verbose=true on the task. But for
the 99.999999% of the time you do not, keep it out of
the build/NAnt log. Makes a big difference to
CruiseControl.Net users!
Much appreciated if these fixes get rolled in soon -
we are running our own build which I obviously would
prefer not to do long term. I've attached the full
file to make life even easier for you...
Thanks,
Grant.
Update.cs with fixes