protected void LogResult(BuildPackageResult result) { if (result.Success) { this.Log.Info("Package '" + result.PackageFileName + "' generated successfully.", this); } else { this.Log.Warn("Package generation was not successful.", this); foreach (var error in result.Errors) { this.Log.Error("errorKey: '" + error.Key + "', message: " + error.Value, this); } } }
public virtual BuildPackageResult BuildPackage(PackageConfiguration packageConfiguration, IDictionary <string, string> parameters) { try { this.Log.Info("Start generating package '" + packageConfiguration.Name + "'...", this); var args = BuildPackagePipeline.BuildPackage(packageConfiguration, parameters); var result = new BuildPackageResult(args); this.LogResult(result); return(result); } catch (Exception ex) { this.Log.Error("Unable to build package '" + packageConfiguration.Name + "'.", ex, this); return(new BuildPackageResult(ex)); } }