/// <summary> /// Builds the WSP package. /// </summary> private static void BuildWSP() { SolutionHandler solutionHandler = null; Solution manifestConfig = ManifestConfig.Load(Config.Current.ManifestConfigPath); if (manifestConfig != null) { solutionHandler = new SolutionHandler(manifestConfig); } else { solutionHandler = new SolutionHandler(Config.Current.SolutionId); } Log.Information("Building the solution - please wait"); // Build the manifest file and cab list solutionHandler.BuildSolution(); Log.Information("Saving the Manifest.xml file"); // Save the manifest file to the file system solutionHandler.Save(); if (solutionHandler.BuildDDF) { Log.Information("Creating the Cabinet.ddf file"); // Save the ddf to the file system solutionHandler.SaveDDF(); } if (!String.IsNullOrEmpty(Config.Current.CreateWSPFileList)) { Log.Information("Creating the filelist " + Config.Current.CreateWSPFileList); solutionHandler.CreateFileList(); } if (solutionHandler.BuildCAB) { Log.Information("Creating the WSP file"); // Create and save the WSP (cab) file CabHandler.CreateCab(solutionHandler.CabFiles); } if (!string.IsNullOrEmpty(Config.Current.CreateDeploymentFolder)) { Log.Information("Creating the deployment folder"); string s = Config.Current.CreateDeploymentFolder.ToLower(); solutionHandler.CreateDeploymentFolder(s == "stsadm" || s == "all", s == "wspbuilder" || s == "all", s == "ssi" || s == "all"); } if (Config.Current.Cleanup) { solutionHandler.Cleanup(); } }
private ServiceFacade() { DBHelper dbHelper = new DBHelper("dbHelper"); this.userHandler = new UserHandler(dbHelper); this.topicHandler = new TopicHandler(dbHelper); this.issueHandler = new IssueHandler(dbHelper); this.solutionHandler = new SolutionHandler(dbHelper); this.pictureHandler = new PictureHandler(dbHelper); //this.itemHandler = new ItemHandler(dbHelper); }
private Program(string[] args) { Options options = null; if (!args.Any()) { System.Console.WriteLine("Running last available solution. Use --help for available options."); System.Console.WriteLine(); options = new Options { RunLastDay = true }; } else { Parser.Default.ParseArguments <Options>(args).WithParsed(o => options = o); } _myConfig = Configuration.Load(); _myOptions = options; _mySolutionHandler = new SolutionHandler(); }
public override bool Execute() { try { buildInfoLog = new BuildInfoLog(Log); //Incase the MSBuild process is up, and the global variable is still exist. deployableArtifactBuilderMap.Clear(); //System.Diagnostics.Debugger.Launch(); buildInfoLog.Info("Artifactory Post-Build task started"); if (!string.IsNullOrWhiteSpace(TfsActive) && TfsActive.Equals("True")) { buildInfoLog.Info("Running inside TFS..."); } SolutionHandler solution = new SolutionHandler(this, buildInfoLog); solution.Execute(); BuildDeploymentHelper buildDeploymentHelper = new BuildDeploymentHelper(); buildDeploymentHelper.deploy(this, solution._buildInfo, buildInfoLog); return(true); } catch (Exception ex) { buildInfoLog.Error("Exception from Artifactory Task: " + ex.Message, ex); /*By returning false in exception, the task will not fail the all build.*/ throw new Exception("Exception from Artifactory Task: " + ex.Message); //return false; } finally { deployableArtifactBuilderMap.Clear(); } }