コード例 #1
0
ファイル: BuildTargets.cs プロジェクト: svoruganti/bounce
        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"
                },
            };
        }
コード例 #2
0
ファイル: BuildTargets.cs プロジェクト: svoruganti/bounce
        public static object RealTargets(IParameters buildParameters)
        {
            var version = buildParameters.Required<string>("version");

            var git = new GitCheckout {
                Repository = "git://github.com/refractalize/bounce.git",
                Directory = "tmp2",
            };
            var solution = new VisualStudioSolution {
                SolutionPath = "Bounce.sln",
            };
            var frameworkProject = solution.Projects["Bounce.Framework"];

            var downloadsDir = new CleanDirectory {
                Path = "Downloads",
            };

            var frameworkZip = new ZipFile {
                Directory = frameworkProject.WhenBuilt(() => Path.GetDirectoryName(frameworkProject.OutputFile.Value)),
                ZipFileName = downloadsDir.Files[version.WhenBuilt(() => string.Format("Bounce.Framework.{0}.zip", version.Value))],
            };

            var downloads = new All(frameworkZip, new GitTag {Directory = ".", Tag = version.WhenBuilt(() => "v" + version.Value)});

            return new {
                Tests = new NUnitTests {
                    DllPaths = solution.Projects.Select(p => p.OutputFile),
                },
                Downloads = downloads,
            };
        }
コード例 #3
0
ファイル: RunTestsTask.cs プロジェクト: haos11/candidate
 public RunTestsTask(bool isRunTests, string buildDirectory, string nUnitConsole, string framework, VisualStudioSolution solution)
 {
     _isRunTests = isRunTests;
     _buildDirectory = buildDirectory;
     _nUnitConsole = nUnitConsole;
     _framework = framework;
     _solution = solution;
 }
コード例 #4
0
ファイル: Build.cs プロジェクト: haos11/bounce
        public static object Targets(IParameters parameters)
        {
            var v4 = new VisualStudioSolution {SolutionPath = @"Bounce.sln", Configuration = "Debug"};
            var v35 = new VisualStudioSolution {SolutionPath = @"Bounce.sln", Configuration = "Debug_3_5" };

            var v4Tests = new NUnitTests
            {
                DllPaths = v4.Projects.Where(p => p.Name.EndsWith("Tests")).Select(p => p.OutputFile),
                NUnitConsolePath = @"References\NUnit\nunit-console.exe"
            };

            var v35Tests = new NUnitTests
            {
                DllPaths = v35.Projects.Where(p => p.Name.EndsWith("Tests")).Select(p => p.OutputFile),
                NUnitConsolePath = @"References\NUnit\nunit-console.exe"
            };

            Task<IEnumerable<string>> dests = new [] {"sdf"};
            dests.SelectTasks(dest => new Copy {ToPath = dest});

            const string nugetExe = @"References\NuGet\NuGet.exe";
            var nugetPackage = new NuGetPackage
            {
                NuGetExePath = nugetExe,
                Spec = v4.Projects["Bounce.Framework"].ProjectFile.WithDependencyOn(v4Tests, v35Tests, v35),
            };

            var nugetPush = new NuGetPush
            {
                ApiKey = EnvironmentVariables.Required<string>("NUGET_API_KEY"),
                NuGetExePath = nugetExe,
                Package = nugetPackage.Package,
            };

            return new
            {
                Net4Binaries = v4,
                Net35Binaries = v35,
                Net4Tests = v4Tests,
                Net35Tests = v35Tests,
                Binaries = new All(v4, v35),
                Tests = new All(v4Tests, v35Tests),
                NuGet = nugetPush,
                NuGetPackage = nugetPackage,
            };
        }
コード例 #5
0
ファイル: BuildTargets.cs プロジェクト: svoruganti/bounce
        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),
                },
            };
        }
コード例 #6
0
ファイル: BuildTargets.cs プロジェクト: haos11/bounce
        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;
        }
コード例 #7
0
 public VisualStudioProject(VisualStudioSolution solution, Val<string> name)
 {
     Solution = solution;
     Name = name;
 }