public async Task <bool> Build(ProgressMonitor monitor) { var res = await DeployService.BuildPackage(monitor, this); needsBuilding = false; return(res); }
void RunTestSourcesPackage(string solFile) { solFile = Util.GetSampleProject(solFile); Solution sol = (Solution)Services.ProjectService.ReadWorkspaceItem(Util.GetMonitor(), solFile); SourcesZipPackageBuilder pb = new SourcesZipPackageBuilder(); pb.FileFormat = sol.FileFormat; pb.SetSolutionItem(sol.RootFolder, sol.GetAllSolutionItems <SolutionItem> ()); pb.TargetFile = GetTempTarFile("sourceszip"); if (!DeployService.BuildPackage(Util.GetMonitor(), pb)) { Assert.Fail("Package generation failed"); } List <string> files = new List <string> (); foreach (string f in sol.GetItemFiles(true)) { files.Add(sol.GetRelativeChildPath(f)); } CheckTarContents(pb.TargetFile, files.ToArray(), true); }
void RunTestTarballPackage(string solFile, bool autotools, string config, string[] expectedFiles) { solFile = Util.GetSampleProject(solFile); Solution sol = (Solution)Services.ProjectService.ReadWorkspaceItem(Util.GetMonitor(), solFile); TarballDeployTarget pb = new TarballDeployTarget(); pb.SetSolutionItem(sol.RootFolder, sol.GetAllSolutionItems <SolutionItem> ()); pb.TargetDir = Util.CreateTmpDir("tarball-target-dir"); pb.DefaultConfiguration = config; pb.GenerateFiles = true; pb.GenerateAutotools = autotools; if (!DeployService.BuildPackage(Util.GetMonitor(), pb)) { Assert.Fail("Package generation failed"); } string tarfile = Directory.GetFiles(pb.TargetDir) [0]; Untar(tarfile, null); string[] dirs = Directory.GetDirectories(pb.TargetDir); Assert.AreEqual(1, dirs.Length); string tarDir = dirs [0]; string prefix = Path.Combine(pb.TargetDir, "install"); if (!Exec(Path.Combine(tarDir, "configure"), "--prefix=" + prefix, tarDir)) { Assert.Fail("Configure script failed"); } if (!Exec("make", "all", tarDir)) { Assert.Fail("Build failed"); } if (!Exec("make", "install", tarDir)) { Assert.Fail("Install failed"); } CheckDirContents(prefix, expectedFiles); }
void RunTestBinariesPackage(string solFile, string[] expectedFiles) { solFile = Util.GetSampleProject(solFile); Solution sol = (Solution)Services.ProjectService.ReadWorkspaceItem(Util.GetMonitor(), solFile); BinariesZipPackageBuilder pb = new BinariesZipPackageBuilder(); pb.SetSolutionItem(sol.RootFolder, sol.GetAllSolutionItems <SolutionItem> ()); pb.TargetFile = GetTempTarFile("binzip"); pb.Platform = "Linux"; pb.Configuration = "Debug"; if (!DeployService.BuildPackage(Util.GetMonitor(), pb)) { Assert.Fail("Package generation failed"); } CheckTarContents(pb.TargetFile, expectedFiles, true); }
public bool Build(IProgressMonitor monitor) { DeployService.BuildPackage(monitor, this); needsBuilding = false; return(true); }