public static object GetTargets(IParameters parameters) { var git = new GitCheckout { Repository = @"C:\Users\Public\Documents\Development\BigSolution.git", Directory = "one" }; var solution = new VisualStudioSolution { SolutionPath = git.Files["BigSolution.sln"] }; var webProject = solution.Projects[parameters.Default("proj", "BigSolution")]; var serviceName = parameters.Default("svc", "BigWindowsService"); var service = solution.Projects[serviceName]; return new { WebSite = new Iis7WebSite { Directory = webProject.ProjectDirectory, Name = "BigWebSite", Port = 5001 }, Tests = new NUnitTests { DllPaths = solution.Projects.Select(p => p.OutputFile) }, Service = new WindowsService { BinaryPath = service.OutputFile, Name = serviceName, DisplayName = "Big Windows Service", Description = "a big windows service demonstrating the bounce build framework" }, Zip = new ZipFile { Directory = webProject.WhenBuilt(() => Path.GetDirectoryName(webProject.OutputFile.Value)), ZipFileName = "web.zip" }, }; }
public static object GetTargets(IParameters parameters) { var git = new GitCheckout { Repository = @"C:\Users\Public\Documents\Development\BigSolution.git", Directory = "one" }; var solution = new VisualStudioSolution { SolutionPath = git.Files["BigSolution.sln"] }; var webProject = solution.Projects[parameters.Default("proj", "BigSolution")]; var serviceName = parameters.Default("svc", "BigWindowsService"); var service = solution.Projects[serviceName]; return(new { WebSite = new Iis7WebSite { Directory = webProject.ProjectDirectory, Name = "BigWebSite", Port = 5001 }, Tests = new NUnitTests { DllPaths = solution.Projects.Select(p => p.OutputFile) }, Service = new WindowsService { BinaryPath = service.OutputFile, Name = serviceName, DisplayName = "Big Windows Service", Description = "a big windows service demonstrating the bounce build framework" }, Zip = new ZipFile { Directory = webProject.WhenBuilt(() => Path.GetDirectoryName(webProject.OutputFile.Value)), ZipFileName = "web.zip" }, }); }
public static object GetTargets(IParameters parameters) { var one = new FakeTask {Dependencies = new [] {new TaskDependency (parameters.Required<int>("port"))}}; var two = new FakeTask {Dependencies = new [] {new TaskDependency (parameters.Default("name", "Some Web Site"))}}; return new { One = one, Two = two, }; }
public static object GetTargets(IParameters parameters) { var one = new FakeTask { Dependencies = new [] { new TaskDependency(parameters.Required <int>("port")) } }; var two = new FakeTask { Dependencies = new [] { new TaskDependency(parameters.Default("name", "Some Web Site")) } }; return(new { One = one, Two = two, }); }
public static object Targets(IParameters parameters) { var solution = new VisualStudioSolution { SolutionPath = "WebSolution.sln", }; var webProject = solution.Projects["CreateWebSite"]; return(new { WebSite = new Iis7WebSite { Directory = webProject.ProjectDirectory, Name = "My Website", Port = parameters.Default("port", 5001), }, Tests = new NUnitTests { DllPaths = solution.Projects.Select(p => p.OutputFile), }, }); }
public static object GetTargets(IParameters parameters) { var stage = parameters.Default("stage", "packageDeploy"); var solution = new VisualStudioSolution { SolutionPath = "Solution.sln" }; var machines = new[] { new DeployMachine { LocalPath = @"c:\Deployments", Machine = "liveserver1", RemotePath = @"\\liveserver1\Deployments" }, new DeployMachine { LocalPath = @"c:\Deployments", Machine = "liveserver2", RemotePath = @"\\liveserver2\Deployments" } }; var targets = new StagedDeployTargetBuilder(stage); var website = targets.CreateTarget("CreateWebSite"); website.Package = new Copy { FromPath = solution.Projects["CreateWebSite"].ProjectDirectory, ToPath = new CleanDirectory { Path = "package" }.Path.SubPath("CreateWebSite") }.ToPath; website.InvokeRemoteDeploy = website.CopyToAndInvokeOnMachines(machines, new SubBounceFactory()); website.Deploy = package => new Iis7WebSite { Directory = new Copy { FromPath = package.SubPath("CreateWebSite"), ToPath = @"C:\Sites\CreateWebSite" }.ToPath, Name = "CreateWebSite" }; return(targets.Targets); }
public static object Targets(IParameters parameters) { var solution = new VisualStudioSolution { SolutionPath = "WebSolution.sln", }; var webProject = solution.Projects["WebSite"]; return new { WebSite = new Iis7WebSite { Directory = webProject.ProjectDirectory, Name = "My Website", Port = parameters.Default("port", 5001), }, Tests = new NUnitTests { DllPaths = solution.Projects.Select(p => p.OutputFile), }, }; }
public static object GetTargets(IParameters parameters) { var stage = parameters.Default("stage", "packageDeploy"); var solution = new VisualStudioSolution {SolutionPath = "Solution.sln"}; var machines = new[] { new DeployMachine { LocalPath = @"c:\Deployments", Machine = "liveserver1", RemotePath = @"\\liveserver1\Deployments" }, new DeployMachine { LocalPath = @"c:\Deployments", Machine = "liveserver2", RemotePath = @"\\liveserver2\Deployments" } }; var targets = new StagedDeployTargetBuilder(stage); var website = targets.CreateTarget("WebSite"); website.Package = new Copy { FromPath = solution.Projects["WebSite"].ProjectDirectory, ToPath = new CleanDirectory {Path = "package"}.Path.SubPath("WebSite") }.ToPath; website.InvokeRemoteDeploy = website.CopyToAndInvokeOnMachines(machines, new SubBounceFactory()); website.Deploy = package => new Iis7WebSite { Directory = new Copy { FromPath = package.SubPath("WebSite"), ToPath = @"C:\Sites\WebSite" }.ToPath, Name = "WebSite" }; return targets.Targets; }