private static Output InnerExecute(Input input, TaskLogger logger) { var execute = GitVersionTaskCommonFunctionality.CreateExecuteCore(); if (!execute.TryGetVersion(input.SolutionDirectory, out var versionVariables, input.NoFetch, new Authentication())) { return(null); } var fileWriteInfo = input.IntermediateOutputPath.GetFileWriteInfo( input.Language, input.ProjectFile, (pf, ext) => $"GitVersionInformation.g.{ext}", (pf, ext) => $"GitVersionInformation_{Path.GetFileNameWithoutExtension(pf)}_{Path.GetRandomFileName()}.g.{ext}" ); var output = new Output() { GitVersionInformationFilePath = Path.Combine(fileWriteInfo.WorkingDirectory, fileWriteInfo.FileName) }; var generator = new GitVersionInformationGenerator(fileWriteInfo.FileName, fileWriteInfo.WorkingDirectory, versionVariables, new FileSystem()); generator.Generate(); return(output); }
private static Output InnerExecute(Input input, TaskLogger logger) { var execute = GitVersionTaskCommonFunctionality.CreateExecuteCore(); if (!execute.TryGetVersion(input.SolutionDirectory, out var result, input.NoFetch, new Authentication())) { return(null); } WriteIntegrationParameters(logger, BuildServerList.GetApplicableBuildServers(), result); return(new Output()); }
private static Output InnerExecute(Input input, TaskLogger logger) { var execute = GitVersionTaskCommonFunctionality.CreateExecuteCore(); TempFileTracker.DeleteTempFiles(); InvalidFileChecker.CheckForInvalidFiles(input.CompileFiles, input.ProjectFile); if (!execute.TryGetVersion(input.SolutionDirectory, out var versionVariables, input.NoFetch, new Authentication())) { return(null); } return(CreateTempAssemblyInfo(input, versionVariables)); }
private static Output InnerExecute(Input input, TaskLogger logger) { if (!GitVersionTaskCommonFunctionality.CreateExecuteCore().TryGetVersion(input.SolutionDirectory, out var versionVariables, input.NoFetch, new GitVersion.Authentication())) { return(null); } var outputType = typeof(Output); var output = new Output(); foreach (var variable in versionVariables) { outputType.GetProperty(variable.Key).SetValue(output, variable.Value, null); } return(output); }
public static Output Execute(Input input) { return(GitVersionTaskCommonFunctionality.ExecuteGitVersionTask(input, InnerExecute)); }