public string ProjectPath()
        {
            var branchPath  = _userInputProvider.Value(Variable.Branch);
            var subfolder   = _userInputProvider.Value(Variable.Subfolder);
            var projectName = _userInputProvider.Value(Variable.ProjectName);

            return(subfolder.Length == 0
                ? Path.Combine(branchPath, projectName)
                : Path.Combine(branchPath, subfolder, projectName));
        }
        public void Prepare()
        {
            _variableProvider.RegisterValue(Variable.ProjectNameConstantCase, _userInputProvider.Value(Variable.ProjectName).ConstantCase());

            var tfs = _tools.GetTool("tfs");

            tfs.Execute(new[] { "checkout", "All Projects (Main).sln" }, _pathProvider.GetSolutionDirectory());

            foreach (var signFileList in SignFileLists())
            {
                if (File.Exists(signFileList))
                {
                    tfs.Execute(new[] { "checkout", signFileList }, _pathProvider.GetBuildStepSignDirectory());
                }
                else
                {
                    throw new Exception($"Expected file does not exist: {signFileList}");
                }
            }
        }
        public void Generate()
        {
            var generatorName = _userInputProvider.Value(GeneratorName);

            _consoleWriter.WriteLine($"Creating ... '{generatorName}' ...");

            var tasks = new List <Task>
            {
            };

            Task.WaitAll(tasks.ToArray());
        }
Exemplo n.º 4
0
        public void Generate()
        {
            _consoleWriter.WriteLine($"Creating the plugin '{_userInputProvider.Value(GeneratorName)}' for the project generator.");
            var fileNameTemplateValues = new Dictionary <string, string>
            {
                ["fileExtension"] = "cs",
                ["generatorName"] = _userInputProvider.Value(GeneratorName),
            };

            var tasks = new[]
            {
                _fileGenerator.FromTemplateGlob("templates/**/*.mustache", GetPluginPath(), fileNameTemplateValues),
                _fileManipulator.AddProjectsToSolution(GetSolutionInfoBuilder().Build(), Sequence.FromNullable(GetProjectInfoBuilder().Build())),
            };

            Task.WaitAll(tasks);
        }
Exemplo n.º 5
0
        public void Prepare()
        {
            var tfs        = _tools.GetTool("tfs");
            var branchPath = _userInputProvider.Value(Variable.Branch);

            tfs.Execute(new[] { "checkout", AllSolutionPath() }, ".");

            foreach (var signFileList in SignFileLists())
            {
                if (File.Exists(signFileList))
                {
                    tfs.Execute(new[] { "checkout", signFileList }, Path.Combine(branchPath, "Build", "AdditionalBuildSteps", "Sign"));
                }
                else
                {
                    throw new Exception($"Expected file does not exist: {signFileList}");
                }
            }
        }
Exemplo n.º 6
0
 private string RepositoryName()
 {
     return(_userInputProvider.Value(RepositoryNameVariable));
 }