/// <summary> /// Generates the specified integration result. /// </summary> /// <param name="integrationResult">The integration result.</param> /// <returns></returns> /// <remarks></remarks> public override string Generate(IIntegrationResult integrationResult) { IntegrationSummary lastIntegration = integrationResult.LastIntegration; if (integrationResult == null || lastIntegration.IsInitial()) { return(LabelPrefix + InitialBuildLabel.ToString(LabelFormat, CultureInfo.CurrentCulture) + LabelPostfix); } else if (ShouldIncrementLabel(lastIntegration)) { return(LabelPrefix + IncrementLabel(lastIntegration.Label) + LabelPostfix); } else { return(integrationResult.LastIntegration.Label); } }
/// <summary> /// Generates the specified integration result. /// </summary> /// <param name="integrationResult">The integration result.</param> /// <returns></returns> /// <remarks></remarks> public override string Generate(IIntegrationResult integrationResult) { if (!string.IsNullOrEmpty(LabelPrefixFile)) { ThoughtWorks.CruiseControl.Core.Util.Log.Debug("Reading prefix from file : " + LabelPrefixFile); LabelPrefix = GetPrefixFromFile(); } IntegrationSummary lastIntegration = integrationResult.LastIntegration; if (integrationResult == null || lastIntegration.IsInitial()) { return(LabelPrefix + InitialBuildLabel.ToString(LabelFormat, CultureInfo.CurrentCulture) + LabelPostfix); } else if (ShouldIncrementLabel(lastIntegration)) { return(LabelPrefix + IncrementLabel(lastIntegration.Label) + LabelPostfix); } else { return(integrationResult.LastIntegration.Label); } }