Hi Ruben,
So this patch will *always* call PostBuild() regardless of
result.ShouldRunBuild() which is a serious problem.
Here is my modification to IntegrationRunner.cs
IntegrationRunner.Integration(...) to fix this problem. These changes
more closely mirror the previous code with respect to the result of
ShouldRunBuild(). I'm now testing with these changes.
public IIntegrationResult Integrate(IntegrationRequest request)
{
IIntegrationResult result = resultManager.StartNewIntegration
(request);
IIntegrationResult lastResult =
resultManager.LastIntegrationResult;
CreateDirectoryIfItDoesntExist(result.WorkingDirectory);
CreateDirectoryIfItDoesntExist(result.ArtifactDirectory);
result.MarkStartTime();
bool GettingModifications = true;
bool RunBuild = false;
try
{
target.CreateLabel(result);
result.Modifications = GetModifications(lastResult, result);
GettingModifications = false;
RunBuild = result.ShouldRunBuild();
if (RunBuild)
{
Log.Info("Building: " + request);
Build(result);
}
}
catch (Exception ex)
{
result.ExceptionResult = ex;
result.SourceControlErrorOccured = GettingModifications;
}
finally
{
if (RunBuild)
{
result.MarkEndTime();
PostBuild(result);
Log.Info(string.Format("Integration complete: {0} - {1}",
result.Status, result.EndTime));
}
target.Activity = ProjectActivity.Sleeping;
}
return result;
}
-Steve
http://www.stevetrefethen.com/blog/
> Hi all
>
> I think I got it fixed, although unit tests are not yet done.
http://jira.public.thoughtworks.org/browse/CCNET-748