Exemplo n.º 1
0
        private static void AppendTasks(BuildEngine buildEngine, StringBuilder cmdLine)
        {
            if (buildEngine.Tasks == null || buildEngine.Tasks.Count == 0)
                return;

            var tasks = new List<string>( buildEngine.Tasks );
            cmdLine.AppendFormat(" /t:{0}", String.Join(";", tasks.ToArray()));
        }
Exemplo n.º 2
0
        public string CommandLineArguments(string pathToBuildFile, BuildEngine buildEngine, IPackageTree packageTree, FrameworkVersion version)
        {
            Console.WriteLine(pathToBuildFile);
            Console.WriteLine(buildEngine);
            Console.WriteLine(packageTree);
            Console.WriteLine(version);

            return string.Empty;
        }
        protected override void Because()
        {
            buildEngine = new BuildEngine(null, "", FrameworkVersion.FrameworkVersion35,
                CreateStub<IDependencyDispatcher>());
            buildEngine.BuildRootDirectory = "output";
            packageTree = MockRepository.GenerateStub<IPackageTree>();
            packageTree.Expect(pt => pt.WorkingDirectory).Return(new DirectoryInfo("C:\\temp"));

            runner = new MSBuildBuildTool();
        }
Exemplo n.º 4
0
        private static void AppendParameters(BuildEngine buildEngine, StringBuilder cmdLine)
        {
            if (buildEngine.Parameters == null || buildEngine.Parameters.Count == 0)
                return;

            foreach (var parameter in buildEngine.Parameters)
            {
                cmdLine.AppendFormat(" {0}={1}", parameter.Key, parameter.Value);
            }
        }
Exemplo n.º 5
0
        protected override void Because()
        {
            string rootPath = GetRootPath();

            packageTree.Stub(x => x.WorkingDirectory).Return(new DirectoryInfo(workingPath));

            packageTree.Stub(x => x.Name).Return("horn");

            var solutionPath = Path.Combine(Path.Combine(rootPath, "Horn.Core"), "Horn.Core.csproj");

            buildEngine = new BuildEngine(new MSBuildBuildTool(), solutionPath, FrameworkVersion.FrameworkVersion35, CreateStub<IDependencyDispatcher>()){BuildRootDirectory = "."};
        }
Exemplo n.º 6
0
        protected override void Because()
        {
            packageTree = CreateStub<IPackageTree>();

            packageTree.Stub(x => x.WorkingDirectory).Return(new DirectoryInfo(@"C:\"));

            buildToolStub = CreateStub<IBuildTool>();

            buildEngine = new BuildEngine(buildToolStub, "deeper/than/this/somebuild.file", FrameworkVersion.FrameworkVersion35, CreateStub<IDependencyDispatcher>());

            buildEngine.Build(new StubProcessFactory(), packageTree);
        }
Exemplo n.º 7
0
        public string CommandLineArguments(string pathToBuildFile, BuildEngine buildEngine, IPackageTree packageTree,
            FrameworkVersion version)
        {
            var cmdLine = new StringBuilder();

            cmdLine.AppendFormat(
                     "{0} /p:OutputPath=\"{1}\"  /p:TargetFrameworkVersion={2} /p:NoWarn=1591 /consoleloggerparameters:Summary",
                     pathToBuildFile.QuotePath(), Path.Combine(packageTree.WorkingDirectory.FullName, buildEngine.BuildRootDirectory),
                     GetFrameworkVersionForBuildTool(version));

            AppendTasks(buildEngine, cmdLine);
            AppendParameters(buildEngine, cmdLine);

            return cmdLine.ToString();
        }
Exemplo n.º 8
0
 public string CommandLineArguments(string pathToBuildFile, BuildEngine buildEngine, IPackageTree packageTree, FrameworkVersion version)
 {
     return string.Format("{0} --rakefile {1} {2}{3}", Path.Combine(GetRubyDirectory(), "rake"), pathToBuildFile, GenerateParameters(buildEngine.Parameters), GenerateTasks(buildEngine.Tasks)).Trim();
 }
Exemplo n.º 9
0
 public string CommandLineArguments(string pathToBuildFile, BuildEngine buildEngine, IPackageTree packageTree, FrameworkVersion version)
 {
     return string.Format(" -f:{0} {1}", pathToBuildFile, GenerateTasks(buildEngine.Tasks)).Trim();
 }
Exemplo n.º 10
0
 protected string GeneratePSakeCommand(string pathToBuildFile, BuildEngine buildEngine)
 {
     return string.Format(@".\psake {0} {1}", Path.GetFileName(pathToBuildFile.Trim('"')), GenerateTasks(buildEngine.Tasks));
 }
Exemplo n.º 11
0
 public abstract string CommandLineArguments(string pathToBuildFile, BuildEngine buildEngine, IPackageTree packageTree, FrameworkVersion version);
Exemplo n.º 12
0
 public override string CommandLineArguments(string pathToBuildFile, BuildEngine buildEngine, IPackageTree packageTree, FrameworkVersion version)
 {
     return string.Format(@"/c echo antani | powershell.exe -command {0}", GeneratePSakeCommand(pathToBuildFile, buildEngine));
 }
Exemplo n.º 13
0
 public string CommandLineArguments(string pathToBuildFile, BuildEngine buildEngine, IPackageTree packageTree, FrameworkVersion version)
 {
     return string.Format(" {0} -t:net-{1} -buildfile:{2} {3}", GenerateTasks(buildEngine.Tasks), GetFrameworkVersionForBuildTool(version), pathToBuildFile, GenerateParameters(buildEngine.Parameters)).Trim();
 }
Exemplo n.º 14
0
        protected override void Because()
        {
            buildEngine = new BuildEngine(null, "", FrameworkVersion.FrameworkVersion35, CreateStub<IDependencyDispatcher>());

            buildEngine.AssignParameters(switches);
        }