void OnStartBuild(object sender, BuildStartEventArgs e) { Debug.Assert(_solutionSpec.UseCKSetup); if (!e.IsUsingDirtyFolder) { return; } // The CKSETUP_CAKE_TARGET_STORE_APIKEY_AND_URL environment variable is always required // except when building in 'remote develop' and 'local'. // The Build script must handle these two cases (so that CodeCakebuilder can be run // directly): on 'develop', the actual remote is used normally and in local, the script // MUST map the local store. Typically: // // if( globalInfo.IsLocalCIRelease ) // { // storeConf.TargetStoreUrl = System.IO.Path.Combine( globalInfo.LocalFeedPath, "CKSetupStore" ); // } // // Ensures that the local stores exist. if (!_localFeedProvider.EnsureCKSetupStores(e.Monitor)) { return; } var targetStore = _localFeedProvider.GetCKSetupStorePath(e.Monitor, e.BuildType); if (!_solutionSpec.NoDotNetUnitTests) { EnsureStorePath(e.Monitor, targetStore); } e.EnvironmentVariables.Add(("CKSETUP_CAKE_TARGET_STORE_APIKEY_AND_URL", targetStore)); }
void OnStartBuild(object sender, BuildStartEventArgs e) { var debug = EnsureDocument().Root.Element(xDebugName); if (debug == null) { EnsureDocument().Root.Add(debug = new XElement(xDebugName)); e.Memory.Add(this, debug); } if ((bool?)debug.Attribute("IgnoreDirtyWorkingFolder") != true) { debug.SetAttributeValue("IgnoreDirtyWorkingFolder", "true"); e.Memory[this] = null; } Save(e.Monitor); }
void OnStartBuild(object sender, BuildStartEventArgs e) { if (!e.IsUsingDirtyFolder) { return; } if ((e.BuildType & BuildType.IsTargetCI) != 0) { EnsureLocalFeeds(e.Monitor, ensureDevelop: true); } else if ((e.BuildType & BuildType.IsTargetRelease) != 0) { EnsureLocalFeeds(e.Monitor, ensureRelease: true); } else if ((e.BuildType & BuildType.IsTargetLocal) == 0) { throw new ArgumentException(nameof(BuildType)); } Save(e.Monitor); }
/// <summary> /// Initializes a new <see cref="BuildEndEventArgs"/> on a <see cref="BuildStartEventArgs"/> and whether it succeed or not. /// </summary> /// <param name="startArgs">The start arguments.</param> /// <param name="success">Whether the build succeed.</param> public BuildEndEventArgs(BuildStartEventArgs startArgs, bool success) : base(startArgs.Monitor) { BuildStartArgs = startArgs; Success = success; }