diff --git a/src/GitVersion.App.Tests/ArgumentParserTests.cs b/src/GitVersion.App.Tests/ArgumentParserTests.cs index 8e048443b5..a3c7c5edbc 100644 --- a/src/GitVersion.App.Tests/ArgumentParserTests.cs +++ b/src/GitVersion.App.Tests/ArgumentParserTests.cs @@ -393,8 +393,8 @@ public void OverrideConfigWithSingleOptions(string options, GitVersionConfigurat { var arguments = this.argumentParser.ParseArguments($"/overrideconfig {options}"); - ConfigurationHelper configruationHelper = new(arguments.OverrideConfig); - configruationHelper.Configuration.ShouldBeEquivalentTo(expected); + ConfigurationHelper configurationHelper = new(arguments.OverrideConfig); + configurationHelper.Configuration.ShouldBeEquivalentTo(expected); } private static IEnumerable OverrideConfigWithSingleOptionTestData() diff --git a/src/GitVersion.App.Tests/PullRequestInBuildAgentTest.cs b/src/GitVersion.App.Tests/PullRequestInBuildAgentTest.cs index f69e6c8fc9..3916219f14 100644 --- a/src/GitVersion.App.Tests/PullRequestInBuildAgentTest.cs +++ b/src/GitVersion.App.Tests/PullRequestInBuildAgentTest.cs @@ -1,6 +1,7 @@ using GitVersion.BuildAgents; using GitVersion.Core.Tests.Helpers; using GitVersion.Extensions; +using GitVersion.Output; using LibGit2Sharp; namespace GitVersion.App.Tests; @@ -167,7 +168,11 @@ private static async Task VerifyPullRequestVersionIsCalculatedProperly(string pu } var programFixture = new ProgramFixture(fixture.RepositoryPath); - programFixture.WithOverrides(services => services.AddModule(new GitVersionBuildAgentsModule())); + programFixture.WithOverrides(services => + { + services.AddModule(new GitVersionBuildAgentsModule()); + services.AddModule(new GitVersionOutputModule()); + }); programFixture.WithEnv(env.ToArray()); var result = await programFixture.Run(); diff --git a/src/GitVersion.App.Tests/UpdateWixVersionFileTests.cs b/src/GitVersion.App.Tests/UpdateWixVersionFileTests.cs index 55d8cf3ec9..8ca10b0471 100644 --- a/src/GitVersion.App.Tests/UpdateWixVersionFileTests.cs +++ b/src/GitVersion.App.Tests/UpdateWixVersionFileTests.cs @@ -1,6 +1,6 @@ using GitVersion.Helpers; +using GitVersion.Output.WixUpdater; using GitVersion.OutputVariables; -using GitVersion.VersionConverters.WixUpdater; namespace GitVersion.App.Tests; diff --git a/src/GitVersion.App/GitVersion.App.csproj b/src/GitVersion.App/GitVersion.App.csproj index 77c7624a17..055a4f3630 100644 --- a/src/GitVersion.App/GitVersion.App.csproj +++ b/src/GitVersion.App/GitVersion.App.csproj @@ -29,6 +29,7 @@ + diff --git a/src/GitVersion.App/Program.cs b/src/GitVersion.App/Program.cs index 368228d1cb..2ef9c32744 100644 --- a/src/GitVersion.App/Program.cs +++ b/src/GitVersion.App/Program.cs @@ -1,5 +1,6 @@ using GitVersion.BuildAgents; using GitVersion.Extensions; +using GitVersion.Output; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; @@ -25,6 +26,7 @@ private IHostBuilder CreateHostBuilder(string[] args) => services.AddModule(new GitVersionCoreModule()); services.AddModule(new GitVersionLibGit2SharpModule()); services.AddModule(new GitVersionBuildAgentsModule()); + services.AddModule(new GitVersionOutputModule()); services.AddModule(new GitVersionAppModule()); services.AddSingleton(sp => diff --git a/src/GitVersion.Core.Tests/GitVersion.Core.Tests.csproj b/src/GitVersion.Core.Tests/GitVersion.Core.Tests.csproj index 22b4818119..0946d95e37 100644 --- a/src/GitVersion.Core.Tests/GitVersion.Core.Tests.csproj +++ b/src/GitVersion.Core.Tests/GitVersion.Core.Tests.csproj @@ -16,6 +16,7 @@ + diff --git a/src/GitVersion.Core.Tests/Helpers/GitVersionCoreTestModule.cs b/src/GitVersion.Core.Tests/Helpers/GitVersionCoreTestModule.cs index a33dc9d46d..bad2ceaae0 100644 --- a/src/GitVersion.Core.Tests/Helpers/GitVersionCoreTestModule.cs +++ b/src/GitVersion.Core.Tests/Helpers/GitVersionCoreTestModule.cs @@ -1,6 +1,7 @@ using GitVersion.BuildAgents; using GitVersion.Extensions; using GitVersion.Logging; +using GitVersion.Output; using Microsoft.Extensions.DependencyInjection; namespace GitVersion.Core.Tests.Helpers; @@ -11,6 +12,7 @@ public void RegisterTypes(IServiceCollection services) { services.AddModule(new GitVersionLibGit2SharpModule()); services.AddModule(new GitVersionBuildAgentsModule()); + services.AddModule(new GitVersionOutputModule()); services.AddModule(new GitVersionCoreModule()); services.AddSingleton(); diff --git a/src/GitVersion.Core/Extensions/CommonExtensions.cs b/src/GitVersion.Core/Extensions/CommonExtensions.cs index 616fe30cd0..bcb368cb5a 100644 --- a/src/GitVersion.Core/Extensions/CommonExtensions.cs +++ b/src/GitVersion.Core/Extensions/CommonExtensions.cs @@ -5,10 +5,10 @@ namespace GitVersion.Extensions; public static class CommonExtensions { - public static T NotNull([NotNull] this T? value, [CallerArgumentExpression("value")] string name = "") + public static T NotNull([NotNull] this T? value, [CallerArgumentExpression(nameof(value))] string name = "") where T : class => value ?? throw new ArgumentNullException(name); - public static string NotNullOrEmpty([NotNull] this string? value, [CallerArgumentExpression("value")] string name = "") + public static string NotNullOrEmpty([NotNull] this string? value, [CallerArgumentExpression(nameof(value))] string name = "") { if (string.IsNullOrEmpty(value)) { @@ -18,7 +18,7 @@ public static string NotNullOrEmpty([NotNull] this string? value, [CallerArgumen return value; } - public static string NotNullOrWhitespace([NotNull] this string? value, [CallerArgumentExpression("value")] string name = "") + public static string NotNullOrWhitespace([NotNull] this string? value, [CallerArgumentExpression(nameof(value))] string name = "") { if (string.IsNullOrWhiteSpace(value)) { diff --git a/src/GitVersion.Core/GitVersion.Core.csproj b/src/GitVersion.Core/GitVersion.Core.csproj index 8049ebf77e..59b60fdcdb 100644 --- a/src/GitVersion.Core/GitVersion.Core.csproj +++ b/src/GitVersion.Core/GitVersion.Core.csproj @@ -21,13 +21,6 @@ - - - - - - - diff --git a/src/GitVersion.Core/GitVersionCommonModule.cs b/src/GitVersion.Core/GitVersionCommonModule.cs index 749b722fd4..6c8b818541 100644 --- a/src/GitVersion.Core/GitVersionCommonModule.cs +++ b/src/GitVersion.Core/GitVersionCommonModule.cs @@ -13,8 +13,6 @@ public void RegisterTypes(IServiceCollection services) services.AddSingleton(); services.AddSingleton(); - services.AddSingleton(); - services.AddSingleton(); services.AddSingleton(); services.AddSingleton(sp => sp.GetRequiredService().Resolve()); diff --git a/src/GitVersion.Core/GitVersionCoreModule.cs b/src/GitVersion.Core/GitVersionCoreModule.cs index 9e9273cf46..7db12aa0d0 100644 --- a/src/GitVersion.Core/GitVersionCoreModule.cs +++ b/src/GitVersion.Core/GitVersionCoreModule.cs @@ -3,7 +3,6 @@ using GitVersion.Extensions; using GitVersion.VersionCalculation; using GitVersion.VersionCalculation.Caching; -using GitVersion.VersionConverters; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Options; @@ -32,6 +31,5 @@ public void RegisterTypes(IServiceCollection services) services.AddModule(new GitVersionCommonModule()); services.AddModule(new ConfigurationModule()); services.AddModule(new VersionCalculationModule()); - services.AddModule(new VersionConvertersModule()); } } diff --git a/src/GitVersion.Core/VersionConverters/IConverterContext.cs b/src/GitVersion.Core/Output/IConverterContext.cs similarity index 67% rename from src/GitVersion.Core/VersionConverters/IConverterContext.cs rename to src/GitVersion.Core/Output/IConverterContext.cs index bcf3165e58..2df5562e71 100644 --- a/src/GitVersion.Core/VersionConverters/IConverterContext.cs +++ b/src/GitVersion.Core/Output/IConverterContext.cs @@ -1,4 +1,4 @@ -namespace GitVersion.VersionConverters; +namespace GitVersion; public interface IConverterContext { diff --git a/src/GitVersion.Core/VersionConverters/IVersionConverter.cs b/src/GitVersion.Core/Output/IVersionConverter.cs similarity index 82% rename from src/GitVersion.Core/VersionConverters/IVersionConverter.cs rename to src/GitVersion.Core/Output/IVersionConverter.cs index ff0428d6b8..03cbf71626 100644 --- a/src/GitVersion.Core/VersionConverters/IVersionConverter.cs +++ b/src/GitVersion.Core/Output/IVersionConverter.cs @@ -1,6 +1,6 @@ using GitVersion.OutputVariables; -namespace GitVersion.VersionConverters; +namespace GitVersion; public interface IVersionConverter : IDisposable where T : IConverterContext { diff --git a/src/GitVersion.Core/PublicAPI.Unshipped.txt b/src/GitVersion.Core/PublicAPI.Unshipped.txt index 2538a9396f..7660b12951 100644 --- a/src/GitVersion.Core/PublicAPI.Unshipped.txt +++ b/src/GitVersion.Core/PublicAPI.Unshipped.txt @@ -389,12 +389,6 @@ GitVersion.GitVersionOptions.Verbosity -> GitVersion.Logging.Verbosity GitVersion.GitVersionOptions.WixInfo.get -> GitVersion.WixInfo! GitVersion.GitVersionOptions.WorkingDirectory.get -> string! GitVersion.GitVersionOptions.WorkingDirectory.set -> void -GitVersion.GitVersionOutputTool -GitVersion.GitVersionOutputTool.GenerateGitVersionInformation(GitVersion.OutputVariables.VersionVariables! variables, GitVersion.FileWriteInfo! fileWriteInfo) -> void -GitVersion.GitVersionOutputTool.GitVersionOutputTool(Microsoft.Extensions.Options.IOptions! options, GitVersion.VersionConverters.OutputGenerator.IOutputGenerator! outputGenerator, GitVersion.VersionConverters.WixUpdater.IWixVersionFileUpdater! wixVersionFileUpdater, GitVersion.VersionConverters.GitVersionInfo.IGitVersionInfoGenerator! gitVersionInfoGenerator, GitVersion.VersionConverters.AssemblyInfo.IAssemblyInfoFileUpdater! assemblyInfoFileUpdater, GitVersion.VersionConverters.AssemblyInfo.IProjectFileUpdater! projectFileUpdater) -> void -GitVersion.GitVersionOutputTool.OutputVariables(GitVersion.OutputVariables.VersionVariables! variables, bool updateBuildNumber) -> void -GitVersion.GitVersionOutputTool.UpdateAssemblyInfo(GitVersion.OutputVariables.VersionVariables! variables) -> void -GitVersion.GitVersionOutputTool.UpdateWixVersionFile(GitVersion.OutputVariables.VersionVariables! variables) -> void GitVersion.Helpers.EncodingHelper GitVersion.Helpers.LambdaEqualityHelper GitVersion.Helpers.LambdaEqualityHelper.Equals(T? instance, T? other) -> bool @@ -601,6 +595,10 @@ GitVersion.MergeMessage.MergedBranch.get -> string! GitVersion.MergeMessage.PullRequestNumber.get -> int? GitVersion.MergeMessage.TargetBranch.get -> string? GitVersion.MergeMessage.Version.get -> GitVersion.SemanticVersion? +GitVersion.IConverterContext +GitVersion.IConverterContext.WorkingDirectory.get -> string! +GitVersion.IVersionConverter +GitVersion.IVersionConverter.Execute(GitVersion.OutputVariables.VersionVariables! variables, T context) -> void GitVersion.OutputType GitVersion.OutputType.BuildServer = 0 -> GitVersion.OutputType GitVersion.OutputType.File = 2 -> GitVersion.OutputType @@ -922,62 +920,6 @@ GitVersion.VersionCalculation.VersioningMode GitVersion.VersionCalculation.VersioningMode.ContinuousDelivery = 0 -> GitVersion.VersionCalculation.VersioningMode GitVersion.VersionCalculation.VersioningMode.ContinuousDeployment = 1 -> GitVersion.VersionCalculation.VersioningMode GitVersion.VersionCalculation.VersioningMode.Mainline = 2 -> GitVersion.VersionCalculation.VersioningMode -GitVersion.VersionConverters.AssemblyInfo.AssemblyInfoContext -GitVersion.VersionConverters.AssemblyInfo.AssemblyInfoContext.AssemblyInfoContext() -> void -GitVersion.VersionConverters.AssemblyInfo.AssemblyInfoContext.AssemblyInfoContext(string! workingDirectory, bool ensureAssemblyInfo, params string![]! assemblyInfoFiles) -> void -GitVersion.VersionConverters.AssemblyInfo.AssemblyInfoContext.AssemblyInfoFiles.get -> string![]! -GitVersion.VersionConverters.AssemblyInfo.AssemblyInfoContext.EnsureAssemblyInfo.get -> bool -GitVersion.VersionConverters.AssemblyInfo.AssemblyInfoContext.WorkingDirectory.get -> string! -GitVersion.VersionConverters.AssemblyInfo.AssemblyInfoFileUpdater -GitVersion.VersionConverters.AssemblyInfo.AssemblyInfoFileUpdater.AssemblyInfoFileUpdater(GitVersion.Logging.ILog! log, GitVersion.IFileSystem! fileSystem) -> void -GitVersion.VersionConverters.AssemblyInfo.AssemblyInfoFileUpdater.Dispose() -> void -GitVersion.VersionConverters.AssemblyInfo.AssemblyInfoFileUpdater.Execute(GitVersion.OutputVariables.VersionVariables! variables, GitVersion.VersionConverters.AssemblyInfo.AssemblyInfoContext context) -> void -GitVersion.VersionConverters.AssemblyInfo.IAssemblyInfoFileUpdater -GitVersion.VersionConverters.AssemblyInfo.IProjectFileUpdater -GitVersion.VersionConverters.AssemblyInfo.IProjectFileUpdater.CanUpdateProjectFile(System.Xml.Linq.XElement! xmlRoot) -> bool -GitVersion.VersionConverters.AssemblyInfo.ProjectFileUpdater -GitVersion.VersionConverters.AssemblyInfo.ProjectFileUpdater.CanUpdateProjectFile(System.Xml.Linq.XElement! xmlRoot) -> bool -GitVersion.VersionConverters.AssemblyInfo.ProjectFileUpdater.Dispose() -> void -GitVersion.VersionConverters.AssemblyInfo.ProjectFileUpdater.Execute(GitVersion.OutputVariables.VersionVariables! variables, GitVersion.VersionConverters.AssemblyInfo.AssemblyInfoContext context) -> void -GitVersion.VersionConverters.AssemblyInfo.ProjectFileUpdater.ProjectFileUpdater(GitVersion.Logging.ILog! log, GitVersion.IFileSystem! fileSystem) -> void -GitVersion.VersionConverters.GitVersionInfo.GitVersionInfoContext -GitVersion.VersionConverters.GitVersionInfo.GitVersionInfoContext.FileExtension.get -> string! -GitVersion.VersionConverters.GitVersionInfo.GitVersionInfoContext.FileName.get -> string! -GitVersion.VersionConverters.GitVersionInfo.GitVersionInfoContext.GitVersionInfoContext() -> void -GitVersion.VersionConverters.GitVersionInfo.GitVersionInfoContext.GitVersionInfoContext(string! workingDirectory, string! fileName, string! fileExtension) -> void -GitVersion.VersionConverters.GitVersionInfo.GitVersionInfoContext.WorkingDirectory.get -> string! -GitVersion.VersionConverters.GitVersionInfo.GitVersionInfoGenerator -GitVersion.VersionConverters.GitVersionInfo.GitVersionInfoGenerator.Dispose() -> void -GitVersion.VersionConverters.GitVersionInfo.GitVersionInfoGenerator.Execute(GitVersion.OutputVariables.VersionVariables! variables, GitVersion.VersionConverters.GitVersionInfo.GitVersionInfoContext context) -> void -GitVersion.VersionConverters.GitVersionInfo.GitVersionInfoGenerator.GitVersionInfoGenerator(GitVersion.IFileSystem! fileSystem) -> void -GitVersion.VersionConverters.GitVersionInfo.IGitVersionInfoGenerator -GitVersion.VersionConverters.IConverterContext -GitVersion.VersionConverters.IConverterContext.WorkingDirectory.get -> string! -GitVersion.VersionConverters.IVersionConverter -GitVersion.VersionConverters.IVersionConverter.Execute(GitVersion.OutputVariables.VersionVariables! variables, T context) -> void -GitVersion.VersionConverters.OutputGenerator.IOutputGenerator -GitVersion.VersionConverters.OutputGenerator.OutputContext -GitVersion.VersionConverters.OutputGenerator.OutputContext.OutputContext() -> void -GitVersion.VersionConverters.OutputGenerator.OutputContext.OutputContext(string! workingDirectory, string? outputFile, bool? updateBuildNumber) -> void -GitVersion.VersionConverters.OutputGenerator.OutputContext.OutputFile.get -> string? -GitVersion.VersionConverters.OutputGenerator.OutputContext.UpdateBuildNumber.get -> bool? -GitVersion.VersionConverters.OutputGenerator.OutputContext.WorkingDirectory.get -> string! -GitVersion.VersionConverters.OutputGenerator.OutputGenerator -GitVersion.VersionConverters.OutputGenerator.OutputGenerator.Dispose() -> void -GitVersion.VersionConverters.OutputGenerator.OutputGenerator.Execute(GitVersion.OutputVariables.VersionVariables! variables, GitVersion.VersionConverters.OutputGenerator.OutputContext context) -> void -GitVersion.VersionConverters.OutputGenerator.OutputGenerator.OutputGenerator(GitVersion.BuildAgents.ICurrentBuildAgent! buildAgent, GitVersion.Logging.IConsole! console, GitVersion.IFileSystem! fileSystem, Microsoft.Extensions.Options.IOptions! options) -> void -GitVersion.VersionConverters.VersionConvertersModule -GitVersion.VersionConverters.VersionConvertersModule.RegisterTypes(Microsoft.Extensions.DependencyInjection.IServiceCollection! services) -> void -GitVersion.VersionConverters.VersionConvertersModule.VersionConvertersModule() -> void -GitVersion.VersionConverters.WixUpdater.IWixVersionFileUpdater -GitVersion.VersionConverters.WixUpdater.WixVersionContext -GitVersion.VersionConverters.WixUpdater.WixVersionContext.WixVersionContext() -> void -GitVersion.VersionConverters.WixUpdater.WixVersionContext.WixVersionContext(string! workingDirectory) -> void -GitVersion.VersionConverters.WixUpdater.WixVersionContext.WorkingDirectory.get -> string! -GitVersion.VersionConverters.WixUpdater.WixVersionFileUpdater -GitVersion.VersionConverters.WixUpdater.WixVersionFileUpdater.Dispose() -> void -GitVersion.VersionConverters.WixUpdater.WixVersionFileUpdater.Execute(GitVersion.OutputVariables.VersionVariables! variables, GitVersion.VersionConverters.WixUpdater.WixVersionContext context) -> void -GitVersion.VersionConverters.WixUpdater.WixVersionFileUpdater.WixVersionFileUpdater(GitVersion.Logging.ILog! log, GitVersion.IFileSystem! fileSystem) -> void GitVersion.VersionField GitVersion.VersionField.Major = 3 -> GitVersion.VersionField GitVersion.VersionField.Minor = 2 -> GitVersion.VersionField @@ -1018,7 +960,6 @@ const GitVersion.VersionCalculation.IncrementStrategyFinder.DefaultMinorPattern const GitVersion.VersionCalculation.IncrementStrategyFinder.DefaultNoBumpPattern = "\\+semver:\\s?(none|skip)" -> string! const GitVersion.VersionCalculation.IncrementStrategyFinder.DefaultPatchPattern = "\\+semver:\\s?(fix|patch)" -> string! const GitVersion.VersionCalculation.MergeMessageVersionStrategy.MergeMessageStrategyPrefix = "Merge message" -> string! -const GitVersion.VersionConverters.WixUpdater.WixVersionFileUpdater.WixVersionFileName = "GitVersion_WixVersion.wxi" -> string! override GitVersion.BranchCommit.Equals(object? obj) -> bool override GitVersion.BranchCommit.GetHashCode() -> int override GitVersion.BuildAgents.LocalBuild.CanApplyToCurrentContext() -> bool diff --git a/src/GitVersion.MsBuild.Tests/GitVersion.MsBuild.Tests.csproj b/src/GitVersion.MsBuild.Tests/GitVersion.MsBuild.Tests.csproj index 29d33d4e42..cc03183950 100644 --- a/src/GitVersion.MsBuild.Tests/GitVersion.MsBuild.Tests.csproj +++ b/src/GitVersion.MsBuild.Tests/GitVersion.MsBuild.Tests.csproj @@ -12,6 +12,7 @@ + diff --git a/src/GitVersion.MsBuild.Tests/Tasks/TestTaskBase.cs b/src/GitVersion.MsBuild.Tests/Tasks/TestTaskBase.cs index ec9c529db7..c053b6487b 100644 --- a/src/GitVersion.MsBuild.Tests/Tasks/TestTaskBase.cs +++ b/src/GitVersion.MsBuild.Tests/Tasks/TestTaskBase.cs @@ -4,6 +4,7 @@ using GitVersion.Extensions; using GitVersion.Helpers; using GitVersion.MsBuild.Tests.Helpers; +using GitVersion.Output; using LibGit2Sharp; using Microsoft.Build.Utilities.ProjectCreation; @@ -21,7 +22,7 @@ protected static MsBuildTaskFixtureResult ExecuteMsBuildTask(T task) where { var fixture = CreateLocalRepositoryFixture(); task.SolutionDirectory = fixture.RepositoryPath; - task.WithOverrides(services => services.AddModule(new GitVersionBuildAgentsModule())); + AddOverrides(task); var msbuildFixture = new MsBuildTaskFixture(fixture); var result = msbuildFixture.Execute(task); if (result.Success == false) Console.WriteLine(result.Log); @@ -45,7 +46,7 @@ protected static MsBuildTaskFixtureResult ExecuteMsBuildTaskInAzurePipeline services.AddModule(new GitVersionBuildAgentsModule())); + AddOverrides(task); var msbuildFixture = new MsBuildTaskFixture(fixture); var environmentVariables = new List>(env.ToArray()); if (buildNumber != null) @@ -68,7 +69,7 @@ protected static MsBuildTaskFixtureResult ExecuteMsBuildTaskInGitHubActions services.AddModule(new GitVersionBuildAgentsModule())); + AddOverrides(task); var msbuildFixture = new MsBuildTaskFixture(fixture); msbuildFixture.WithEnv( new KeyValuePair("GITHUB_ACTIONS", "true"), @@ -93,6 +94,12 @@ protected static MsBuildExeFixtureResult ExecuteMsBuildExeInAzurePipeline(Action if (result.MsBuild.OverallSuccess == false) Console.WriteLine(result.Output); return result; } + private static void AddOverrides(GitVersionTaskBase task) => + task.WithOverrides(services => + { + services.AddModule(new GitVersionBuildAgentsModule()); + services.AddModule(new GitVersionOutputModule()); + }); private static EmptyRepositoryFixture CreateLocalRepositoryFixture() { diff --git a/src/GitVersion.MsBuild/GitVersion.MsBuild.csproj b/src/GitVersion.MsBuild/GitVersion.MsBuild.csproj index 434ff33998..7717f6a543 100644 --- a/src/GitVersion.MsBuild/GitVersion.MsBuild.csproj +++ b/src/GitVersion.MsBuild/GitVersion.MsBuild.csproj @@ -19,6 +19,7 @@ + diff --git a/src/GitVersion.MsBuild/GitVersionTasks.cs b/src/GitVersion.MsBuild/GitVersionTasks.cs index c8628cb15f..f154af25d0 100644 --- a/src/GitVersion.MsBuild/GitVersionTasks.cs +++ b/src/GitVersion.MsBuild/GitVersionTasks.cs @@ -2,6 +2,7 @@ using GitVersion.Extensions; using GitVersion.Logging; using GitVersion.MsBuild.Tasks; +using GitVersion.Output; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Options; @@ -69,6 +70,7 @@ private static IServiceProvider BuildServiceProvider(GitVersionTaskBase task) services.AddSingleton(Options.Create(gitVersionOptions)); services.AddModule(new GitVersionCoreModule()); services.AddModule(new GitVersionBuildAgentsModule()); + services.AddModule(new GitVersionOutputModule()); services.AddModule(new GitVersionMsBuildModule()); services.AddSingleton(new MsBuildAdapter(task.Log)); task.Overrides?.Invoke(services); diff --git a/src/GitVersion.Output.Tests/GitVersion.Output.Tests.csproj b/src/GitVersion.Output.Tests/GitVersion.Output.Tests.csproj new file mode 100644 index 0000000000..d54414c314 --- /dev/null +++ b/src/GitVersion.Output.Tests/GitVersion.Output.Tests.csproj @@ -0,0 +1,7 @@ + + + + + + + diff --git a/src/GitVersion.Core.Tests/VersionConverters/Approved/WixFileTests.UpdateWixVersionFile.approved.txt b/src/GitVersion.Output.Tests/Output/Approved/WixFileTests.UpdateWixVersionFile.approved.txt similarity index 100% rename from src/GitVersion.Core.Tests/VersionConverters/Approved/WixFileTests.UpdateWixVersionFile.approved.txt rename to src/GitVersion.Output.Tests/Output/Approved/WixFileTests.UpdateWixVersionFile.approved.txt diff --git a/src/GitVersion.Core.Tests/VersionConverters/Approved/WixFileTests.UpdateWixVersionFileWhenFileAlreadyExists.approved.txt b/src/GitVersion.Output.Tests/Output/Approved/WixFileTests.UpdateWixVersionFileWhenFileAlreadyExists.approved.txt similarity index 100% rename from src/GitVersion.Core.Tests/VersionConverters/Approved/WixFileTests.UpdateWixVersionFileWhenFileAlreadyExists.approved.txt rename to src/GitVersion.Output.Tests/Output/Approved/WixFileTests.UpdateWixVersionFileWhenFileAlreadyExists.approved.txt diff --git a/src/GitVersion.Core.Tests/VersionConverters/Approved/cs/AssemblyInfoFileUpdaterTests.Issue1183ShouldAddFSharpAssemblyInformationalVersionBesideOtherAttributes.approved.txt b/src/GitVersion.Output.Tests/Output/Approved/cs/AssemblyInfoFileUpdaterTests.Issue1183ShouldAddFSharpAssemblyInformationalVersionBesideOtherAttributes.approved.txt similarity index 100% rename from src/GitVersion.Core.Tests/VersionConverters/Approved/cs/AssemblyInfoFileUpdaterTests.Issue1183ShouldAddFSharpAssemblyInformationalVersionBesideOtherAttributes.approved.txt rename to src/GitVersion.Output.Tests/Output/Approved/cs/AssemblyInfoFileUpdaterTests.Issue1183ShouldAddFSharpAssemblyInformationalVersionBesideOtherAttributes.approved.txt diff --git a/src/GitVersion.Core.Tests/VersionConverters/Approved/cs/AssemblyInfoFileUpdaterTests.ShouldAddAssemblyInformationalVersionWhenUpdatingAssemblyVersionFile.approved.txt b/src/GitVersion.Output.Tests/Output/Approved/cs/AssemblyInfoFileUpdaterTests.ShouldAddAssemblyInformationalVersionWhenUpdatingAssemblyVersionFile.approved.txt similarity index 100% rename from src/GitVersion.Core.Tests/VersionConverters/Approved/cs/AssemblyInfoFileUpdaterTests.ShouldAddAssemblyInformationalVersionWhenUpdatingAssemblyVersionFile.approved.txt rename to src/GitVersion.Output.Tests/Output/Approved/cs/AssemblyInfoFileUpdaterTests.ShouldAddAssemblyInformationalVersionWhenUpdatingAssemblyVersionFile.approved.txt diff --git a/src/GitVersion.Core.Tests/VersionConverters/Approved/cs/AssemblyInfoFileUpdaterTests.ShouldCreateAssemblyInfoFileAtPathWhenNotExistsAndEnsureAssemblyInfo.approved.txt b/src/GitVersion.Output.Tests/Output/Approved/cs/AssemblyInfoFileUpdaterTests.ShouldCreateAssemblyInfoFileAtPathWhenNotExistsAndEnsureAssemblyInfo.approved.txt similarity index 100% rename from src/GitVersion.Core.Tests/VersionConverters/Approved/cs/AssemblyInfoFileUpdaterTests.ShouldCreateAssemblyInfoFileAtPathWhenNotExistsAndEnsureAssemblyInfo.approved.txt rename to src/GitVersion.Output.Tests/Output/Approved/cs/AssemblyInfoFileUpdaterTests.ShouldCreateAssemblyInfoFileAtPathWhenNotExistsAndEnsureAssemblyInfo.approved.txt diff --git a/src/GitVersion.Core.Tests/VersionConverters/Approved/cs/AssemblyInfoFileUpdaterTests.ShouldCreateAssemblyInfoFileWhenNotExistsAndEnsureAssemblyInfo.approved.txt b/src/GitVersion.Output.Tests/Output/Approved/cs/AssemblyInfoFileUpdaterTests.ShouldCreateAssemblyInfoFileWhenNotExistsAndEnsureAssemblyInfo.approved.txt similarity index 100% rename from src/GitVersion.Core.Tests/VersionConverters/Approved/cs/AssemblyInfoFileUpdaterTests.ShouldCreateAssemblyInfoFileWhenNotExistsAndEnsureAssemblyInfo.approved.txt rename to src/GitVersion.Output.Tests/Output/Approved/cs/AssemblyInfoFileUpdaterTests.ShouldCreateAssemblyInfoFileWhenNotExistsAndEnsureAssemblyInfo.approved.txt diff --git a/src/GitVersion.Core.Tests/VersionConverters/Approved/cs/AssemblyInfoFileUpdaterTests.ShouldCreateAssemblyInfoFilesAtPathWhenNotExistsAndEnsureAssemblyInfo.approved.txt b/src/GitVersion.Output.Tests/Output/Approved/cs/AssemblyInfoFileUpdaterTests.ShouldCreateAssemblyInfoFilesAtPathWhenNotExistsAndEnsureAssemblyInfo.approved.txt similarity index 100% rename from src/GitVersion.Core.Tests/VersionConverters/Approved/cs/AssemblyInfoFileUpdaterTests.ShouldCreateAssemblyInfoFilesAtPathWhenNotExistsAndEnsureAssemblyInfo.approved.txt rename to src/GitVersion.Output.Tests/Output/Approved/cs/AssemblyInfoFileUpdaterTests.ShouldCreateAssemblyInfoFilesAtPathWhenNotExistsAndEnsureAssemblyInfo.approved.txt diff --git a/src/GitVersion.Core.Tests/VersionConverters/Approved/cs/AssemblyInfoFileUpdaterTests.ShouldNotAddAssemblyInformationalVersionWhenVersionSchemeIsNone.approved.txt b/src/GitVersion.Output.Tests/Output/Approved/cs/AssemblyInfoFileUpdaterTests.ShouldNotAddAssemblyInformationalVersionWhenVersionSchemeIsNone.approved.txt similarity index 100% rename from src/GitVersion.Core.Tests/VersionConverters/Approved/cs/AssemblyInfoFileUpdaterTests.ShouldNotAddAssemblyInformationalVersionWhenVersionSchemeIsNone.approved.txt rename to src/GitVersion.Output.Tests/Output/Approved/cs/AssemblyInfoFileUpdaterTests.ShouldNotAddAssemblyInformationalVersionWhenVersionSchemeIsNone.approved.txt diff --git a/src/GitVersion.Core.Tests/VersionConverters/Approved/cs/AssemblyInfoFileUpdaterTests.ShouldNotReplaceAssemblyVersionWhenVersionSchemeIsNone.approved.txt b/src/GitVersion.Output.Tests/Output/Approved/cs/AssemblyInfoFileUpdaterTests.ShouldNotReplaceAssemblyVersionWhenVersionSchemeIsNone.approved.txt similarity index 100% rename from src/GitVersion.Core.Tests/VersionConverters/Approved/cs/AssemblyInfoFileUpdaterTests.ShouldNotReplaceAssemblyVersionWhenVersionSchemeIsNone.approved.txt rename to src/GitVersion.Output.Tests/Output/Approved/cs/AssemblyInfoFileUpdaterTests.ShouldNotReplaceAssemblyVersionWhenVersionSchemeIsNone.approved.txt diff --git a/src/GitVersion.Core.Tests/VersionConverters/Approved/cs/GitVersionInfoGeneratorTests.ShouldCreateFile.approved.txt b/src/GitVersion.Output.Tests/Output/Approved/cs/GitVersionInfoGeneratorTests.ShouldCreateFile.approved.txt similarity index 100% rename from src/GitVersion.Core.Tests/VersionConverters/Approved/cs/GitVersionInfoGeneratorTests.ShouldCreateFile.approved.txt rename to src/GitVersion.Output.Tests/Output/Approved/cs/GitVersionInfoGeneratorTests.ShouldCreateFile.approved.txt diff --git a/src/GitVersion.Core.Tests/VersionConverters/Approved/fs/AssemblyInfoFileUpdaterTests.Issue1183ShouldAddFSharpAssemblyInformationalVersionBesideOtherAttributes.approved.txt b/src/GitVersion.Output.Tests/Output/Approved/fs/AssemblyInfoFileUpdaterTests.Issue1183ShouldAddFSharpAssemblyInformationalVersionBesideOtherAttributes.approved.txt similarity index 100% rename from src/GitVersion.Core.Tests/VersionConverters/Approved/fs/AssemblyInfoFileUpdaterTests.Issue1183ShouldAddFSharpAssemblyInformationalVersionBesideOtherAttributes.approved.txt rename to src/GitVersion.Output.Tests/Output/Approved/fs/AssemblyInfoFileUpdaterTests.Issue1183ShouldAddFSharpAssemblyInformationalVersionBesideOtherAttributes.approved.txt diff --git a/src/GitVersion.Core.Tests/VersionConverters/Approved/fs/AssemblyInfoFileUpdaterTests.ShouldAddAssemblyInformationalVersionWhenUpdatingAssemblyVersionFile.approved.txt b/src/GitVersion.Output.Tests/Output/Approved/fs/AssemblyInfoFileUpdaterTests.ShouldAddAssemblyInformationalVersionWhenUpdatingAssemblyVersionFile.approved.txt similarity index 100% rename from src/GitVersion.Core.Tests/VersionConverters/Approved/fs/AssemblyInfoFileUpdaterTests.ShouldAddAssemblyInformationalVersionWhenUpdatingAssemblyVersionFile.approved.txt rename to src/GitVersion.Output.Tests/Output/Approved/fs/AssemblyInfoFileUpdaterTests.ShouldAddAssemblyInformationalVersionWhenUpdatingAssemblyVersionFile.approved.txt diff --git a/src/GitVersion.Core.Tests/VersionConverters/Approved/fs/AssemblyInfoFileUpdaterTests.ShouldCreateAssemblyInfoFileAtPathWhenNotExistsAndEnsureAssemblyInfo.approved.txt b/src/GitVersion.Output.Tests/Output/Approved/fs/AssemblyInfoFileUpdaterTests.ShouldCreateAssemblyInfoFileAtPathWhenNotExistsAndEnsureAssemblyInfo.approved.txt similarity index 100% rename from src/GitVersion.Core.Tests/VersionConverters/Approved/fs/AssemblyInfoFileUpdaterTests.ShouldCreateAssemblyInfoFileAtPathWhenNotExistsAndEnsureAssemblyInfo.approved.txt rename to src/GitVersion.Output.Tests/Output/Approved/fs/AssemblyInfoFileUpdaterTests.ShouldCreateAssemblyInfoFileAtPathWhenNotExistsAndEnsureAssemblyInfo.approved.txt diff --git a/src/GitVersion.Core.Tests/VersionConverters/Approved/fs/AssemblyInfoFileUpdaterTests.ShouldCreateAssemblyInfoFileWhenNotExistsAndEnsureAssemblyInfo.approved.txt b/src/GitVersion.Output.Tests/Output/Approved/fs/AssemblyInfoFileUpdaterTests.ShouldCreateAssemblyInfoFileWhenNotExistsAndEnsureAssemblyInfo.approved.txt similarity index 100% rename from src/GitVersion.Core.Tests/VersionConverters/Approved/fs/AssemblyInfoFileUpdaterTests.ShouldCreateAssemblyInfoFileWhenNotExistsAndEnsureAssemblyInfo.approved.txt rename to src/GitVersion.Output.Tests/Output/Approved/fs/AssemblyInfoFileUpdaterTests.ShouldCreateAssemblyInfoFileWhenNotExistsAndEnsureAssemblyInfo.approved.txt diff --git a/src/GitVersion.Core.Tests/VersionConverters/Approved/fs/AssemblyInfoFileUpdaterTests.ShouldCreateAssemblyInfoFilesAtPathWhenNotExistsAndEnsureAssemblyInfo.approved.txt b/src/GitVersion.Output.Tests/Output/Approved/fs/AssemblyInfoFileUpdaterTests.ShouldCreateAssemblyInfoFilesAtPathWhenNotExistsAndEnsureAssemblyInfo.approved.txt similarity index 100% rename from src/GitVersion.Core.Tests/VersionConverters/Approved/fs/AssemblyInfoFileUpdaterTests.ShouldCreateAssemblyInfoFilesAtPathWhenNotExistsAndEnsureAssemblyInfo.approved.txt rename to src/GitVersion.Output.Tests/Output/Approved/fs/AssemblyInfoFileUpdaterTests.ShouldCreateAssemblyInfoFilesAtPathWhenNotExistsAndEnsureAssemblyInfo.approved.txt diff --git a/src/GitVersion.Core.Tests/VersionConverters/Approved/fs/AssemblyInfoFileUpdaterTests.ShouldNotAddAssemblyInformationalVersionWhenVersionSchemeIsNone.approved.txt b/src/GitVersion.Output.Tests/Output/Approved/fs/AssemblyInfoFileUpdaterTests.ShouldNotAddAssemblyInformationalVersionWhenVersionSchemeIsNone.approved.txt similarity index 100% rename from src/GitVersion.Core.Tests/VersionConverters/Approved/fs/AssemblyInfoFileUpdaterTests.ShouldNotAddAssemblyInformationalVersionWhenVersionSchemeIsNone.approved.txt rename to src/GitVersion.Output.Tests/Output/Approved/fs/AssemblyInfoFileUpdaterTests.ShouldNotAddAssemblyInformationalVersionWhenVersionSchemeIsNone.approved.txt diff --git a/src/GitVersion.Core.Tests/VersionConverters/Approved/fs/AssemblyInfoFileUpdaterTests.ShouldNotReplaceAssemblyVersionWhenVersionSchemeIsNone.approved.txt b/src/GitVersion.Output.Tests/Output/Approved/fs/AssemblyInfoFileUpdaterTests.ShouldNotReplaceAssemblyVersionWhenVersionSchemeIsNone.approved.txt similarity index 100% rename from src/GitVersion.Core.Tests/VersionConverters/Approved/fs/AssemblyInfoFileUpdaterTests.ShouldNotReplaceAssemblyVersionWhenVersionSchemeIsNone.approved.txt rename to src/GitVersion.Output.Tests/Output/Approved/fs/AssemblyInfoFileUpdaterTests.ShouldNotReplaceAssemblyVersionWhenVersionSchemeIsNone.approved.txt diff --git a/src/GitVersion.Core.Tests/VersionConverters/Approved/fs/GitVersionInfoGeneratorTests.ShouldCreateFile.approved.txt b/src/GitVersion.Output.Tests/Output/Approved/fs/GitVersionInfoGeneratorTests.ShouldCreateFile.approved.txt similarity index 100% rename from src/GitVersion.Core.Tests/VersionConverters/Approved/fs/GitVersionInfoGeneratorTests.ShouldCreateFile.approved.txt rename to src/GitVersion.Output.Tests/Output/Approved/fs/GitVersionInfoGeneratorTests.ShouldCreateFile.approved.txt diff --git a/src/GitVersion.Core.Tests/VersionConverters/Approved/vb/AssemblyInfoFileUpdaterTests.Issue1183ShouldAddFSharpAssemblyInformationalVersionBesideOtherAttributes.approved.txt b/src/GitVersion.Output.Tests/Output/Approved/vb/AssemblyInfoFileUpdaterTests.Issue1183ShouldAddFSharpAssemblyInformationalVersionBesideOtherAttributes.approved.txt similarity index 100% rename from src/GitVersion.Core.Tests/VersionConverters/Approved/vb/AssemblyInfoFileUpdaterTests.Issue1183ShouldAddFSharpAssemblyInformationalVersionBesideOtherAttributes.approved.txt rename to src/GitVersion.Output.Tests/Output/Approved/vb/AssemblyInfoFileUpdaterTests.Issue1183ShouldAddFSharpAssemblyInformationalVersionBesideOtherAttributes.approved.txt diff --git a/src/GitVersion.Core.Tests/VersionConverters/Approved/vb/AssemblyInfoFileUpdaterTests.ShouldAddAssemblyInformationalVersionWhenUpdatingAssemblyVersionFile.approved.txt b/src/GitVersion.Output.Tests/Output/Approved/vb/AssemblyInfoFileUpdaterTests.ShouldAddAssemblyInformationalVersionWhenUpdatingAssemblyVersionFile.approved.txt similarity index 100% rename from src/GitVersion.Core.Tests/VersionConverters/Approved/vb/AssemblyInfoFileUpdaterTests.ShouldAddAssemblyInformationalVersionWhenUpdatingAssemblyVersionFile.approved.txt rename to src/GitVersion.Output.Tests/Output/Approved/vb/AssemblyInfoFileUpdaterTests.ShouldAddAssemblyInformationalVersionWhenUpdatingAssemblyVersionFile.approved.txt diff --git a/src/GitVersion.Core.Tests/VersionConverters/Approved/vb/AssemblyInfoFileUpdaterTests.ShouldCreateAssemblyInfoFileAtPathWhenNotExistsAndEnsureAssemblyInfo.approved.txt b/src/GitVersion.Output.Tests/Output/Approved/vb/AssemblyInfoFileUpdaterTests.ShouldCreateAssemblyInfoFileAtPathWhenNotExistsAndEnsureAssemblyInfo.approved.txt similarity index 100% rename from src/GitVersion.Core.Tests/VersionConverters/Approved/vb/AssemblyInfoFileUpdaterTests.ShouldCreateAssemblyInfoFileAtPathWhenNotExistsAndEnsureAssemblyInfo.approved.txt rename to src/GitVersion.Output.Tests/Output/Approved/vb/AssemblyInfoFileUpdaterTests.ShouldCreateAssemblyInfoFileAtPathWhenNotExistsAndEnsureAssemblyInfo.approved.txt diff --git a/src/GitVersion.Core.Tests/VersionConverters/Approved/vb/AssemblyInfoFileUpdaterTests.ShouldCreateAssemblyInfoFileWhenNotExistsAndEnsureAssemblyInfo.approved.txt b/src/GitVersion.Output.Tests/Output/Approved/vb/AssemblyInfoFileUpdaterTests.ShouldCreateAssemblyInfoFileWhenNotExistsAndEnsureAssemblyInfo.approved.txt similarity index 100% rename from src/GitVersion.Core.Tests/VersionConverters/Approved/vb/AssemblyInfoFileUpdaterTests.ShouldCreateAssemblyInfoFileWhenNotExistsAndEnsureAssemblyInfo.approved.txt rename to src/GitVersion.Output.Tests/Output/Approved/vb/AssemblyInfoFileUpdaterTests.ShouldCreateAssemblyInfoFileWhenNotExistsAndEnsureAssemblyInfo.approved.txt diff --git a/src/GitVersion.Core.Tests/VersionConverters/Approved/vb/AssemblyInfoFileUpdaterTests.ShouldCreateAssemblyInfoFilesAtPathWhenNotExistsAndEnsureAssemblyInfo.approved.txt b/src/GitVersion.Output.Tests/Output/Approved/vb/AssemblyInfoFileUpdaterTests.ShouldCreateAssemblyInfoFilesAtPathWhenNotExistsAndEnsureAssemblyInfo.approved.txt similarity index 100% rename from src/GitVersion.Core.Tests/VersionConverters/Approved/vb/AssemblyInfoFileUpdaterTests.ShouldCreateAssemblyInfoFilesAtPathWhenNotExistsAndEnsureAssemblyInfo.approved.txt rename to src/GitVersion.Output.Tests/Output/Approved/vb/AssemblyInfoFileUpdaterTests.ShouldCreateAssemblyInfoFilesAtPathWhenNotExistsAndEnsureAssemblyInfo.approved.txt diff --git a/src/GitVersion.Core.Tests/VersionConverters/Approved/vb/AssemblyInfoFileUpdaterTests.ShouldNotAddAssemblyInformationalVersionWhenVersionSchemeIsNone.approved.txt b/src/GitVersion.Output.Tests/Output/Approved/vb/AssemblyInfoFileUpdaterTests.ShouldNotAddAssemblyInformationalVersionWhenVersionSchemeIsNone.approved.txt similarity index 100% rename from src/GitVersion.Core.Tests/VersionConverters/Approved/vb/AssemblyInfoFileUpdaterTests.ShouldNotAddAssemblyInformationalVersionWhenVersionSchemeIsNone.approved.txt rename to src/GitVersion.Output.Tests/Output/Approved/vb/AssemblyInfoFileUpdaterTests.ShouldNotAddAssemblyInformationalVersionWhenVersionSchemeIsNone.approved.txt diff --git a/src/GitVersion.Core.Tests/VersionConverters/Approved/vb/AssemblyInfoFileUpdaterTests.ShouldNotReplaceAssemblyVersionWhenVersionSchemeIsNone.approved.txt b/src/GitVersion.Output.Tests/Output/Approved/vb/AssemblyInfoFileUpdaterTests.ShouldNotReplaceAssemblyVersionWhenVersionSchemeIsNone.approved.txt similarity index 100% rename from src/GitVersion.Core.Tests/VersionConverters/Approved/vb/AssemblyInfoFileUpdaterTests.ShouldNotReplaceAssemblyVersionWhenVersionSchemeIsNone.approved.txt rename to src/GitVersion.Output.Tests/Output/Approved/vb/AssemblyInfoFileUpdaterTests.ShouldNotReplaceAssemblyVersionWhenVersionSchemeIsNone.approved.txt diff --git a/src/GitVersion.Core.Tests/VersionConverters/Approved/vb/GitVersionInfoGeneratorTests.ShouldCreateFile.approved.txt b/src/GitVersion.Output.Tests/Output/Approved/vb/GitVersionInfoGeneratorTests.ShouldCreateFile.approved.txt similarity index 100% rename from src/GitVersion.Core.Tests/VersionConverters/Approved/vb/GitVersionInfoGeneratorTests.ShouldCreateFile.approved.txt rename to src/GitVersion.Output.Tests/Output/Approved/vb/GitVersionInfoGeneratorTests.ShouldCreateFile.approved.txt diff --git a/src/GitVersion.Core.Tests/VersionConverters/AssemblyFileVersionTests.cs b/src/GitVersion.Output.Tests/Output/AssemblyFileVersionTests.cs similarity index 100% rename from src/GitVersion.Core.Tests/VersionConverters/AssemblyFileVersionTests.cs rename to src/GitVersion.Output.Tests/Output/AssemblyFileVersionTests.cs diff --git a/src/GitVersion.Core.Tests/VersionConverters/AssemblyInfoFileUpdaterTests.cs b/src/GitVersion.Output.Tests/Output/AssemblyInfoFileUpdaterTests.cs similarity index 99% rename from src/GitVersion.Core.Tests/VersionConverters/AssemblyInfoFileUpdaterTests.cs rename to src/GitVersion.Output.Tests/Output/AssemblyInfoFileUpdaterTests.cs index 437ebcf81d..c241c05f53 100644 --- a/src/GitVersion.Core.Tests/VersionConverters/AssemblyInfoFileUpdaterTests.cs +++ b/src/GitVersion.Output.Tests/Output/AssemblyInfoFileUpdaterTests.cs @@ -3,9 +3,9 @@ using GitVersion.Extensions; using GitVersion.Helpers; using GitVersion.Logging; +using GitVersion.Output.AssemblyInfo; using GitVersion.OutputVariables; using GitVersion.VersionCalculation; -using GitVersion.VersionConverters.AssemblyInfo; using Microsoft.Extensions.DependencyInjection; namespace GitVersion.Core.Tests; diff --git a/src/GitVersion.Core.Tests/VersionConverters/GitVersionInfoGeneratorTests.cs b/src/GitVersion.Output.Tests/Output/GitVersionInfoGeneratorTests.cs similarity index 97% rename from src/GitVersion.Core.Tests/VersionConverters/GitVersionInfoGeneratorTests.cs rename to src/GitVersion.Output.Tests/Output/GitVersionInfoGeneratorTests.cs index 0d6431c747..75c84c6ca4 100644 --- a/src/GitVersion.Core.Tests/VersionConverters/GitVersionInfoGeneratorTests.cs +++ b/src/GitVersion.Output.Tests/Output/GitVersionInfoGeneratorTests.cs @@ -1,7 +1,7 @@ using GitVersion.Core.Tests.Helpers; using GitVersion.Helpers; +using GitVersion.Output.GitVersionInfo; using GitVersion.VersionCalculation; -using GitVersion.VersionConverters.GitVersionInfo; using Microsoft.Extensions.DependencyInjection; namespace GitVersion.Core.Tests; diff --git a/src/GitVersion.Core.Tests/VersionConverters/InformationalVersionBuilderTests.cs b/src/GitVersion.Output.Tests/Output/InformationalVersionBuilderTests.cs similarity index 100% rename from src/GitVersion.Core.Tests/VersionConverters/InformationalVersionBuilderTests.cs rename to src/GitVersion.Output.Tests/Output/InformationalVersionBuilderTests.cs diff --git a/src/GitVersion.Core.Tests/VersionConverters/ProjectFileUpdaterTests.cs b/src/GitVersion.Output.Tests/Output/ProjectFileUpdaterTests.cs similarity index 99% rename from src/GitVersion.Core.Tests/VersionConverters/ProjectFileUpdaterTests.cs rename to src/GitVersion.Output.Tests/Output/ProjectFileUpdaterTests.cs index 864063ed79..2d7b6ebcb7 100644 --- a/src/GitVersion.Core.Tests/VersionConverters/ProjectFileUpdaterTests.cs +++ b/src/GitVersion.Output.Tests/Output/ProjectFileUpdaterTests.cs @@ -4,9 +4,9 @@ using GitVersion.Extensions; using GitVersion.Helpers; using GitVersion.Logging; +using GitVersion.Output.AssemblyInfo; using GitVersion.OutputVariables; using GitVersion.VersionCalculation; -using GitVersion.VersionConverters.AssemblyInfo; using Microsoft.Extensions.DependencyInjection; namespace GitVersion.Core.Tests; diff --git a/src/GitVersion.Core.Tests/VersionConverters/WixFileTests.cs b/src/GitVersion.Output.Tests/Output/WixFileTests.cs similarity index 98% rename from src/GitVersion.Core.Tests/VersionConverters/WixFileTests.cs rename to src/GitVersion.Output.Tests/Output/WixFileTests.cs index f3cecb922a..4541ceaa51 100644 --- a/src/GitVersion.Core.Tests/VersionConverters/WixFileTests.cs +++ b/src/GitVersion.Output.Tests/Output/WixFileTests.cs @@ -1,8 +1,8 @@ using GitVersion.Core.Tests.Helpers; using GitVersion.Helpers; using GitVersion.Logging; +using GitVersion.Output.WixUpdater; using GitVersion.VersionCalculation; -using GitVersion.VersionConverters.WixUpdater; using Microsoft.Extensions.DependencyInjection; namespace GitVersion.Core.Tests; diff --git a/src/GitVersion.Core/VersionConverters/AssemblyInfo/AddFormats/VersionAssemblyInfo.cs b/src/GitVersion.Output/AssemblyInfo/AddFormats/VersionAssemblyInfo.cs similarity index 100% rename from src/GitVersion.Core/VersionConverters/AssemblyInfo/AddFormats/VersionAssemblyInfo.cs rename to src/GitVersion.Output/AssemblyInfo/AddFormats/VersionAssemblyInfo.cs diff --git a/src/GitVersion.Core/VersionConverters/AssemblyInfo/AddFormats/VersionAssemblyInfo.fs b/src/GitVersion.Output/AssemblyInfo/AddFormats/VersionAssemblyInfo.fs similarity index 100% rename from src/GitVersion.Core/VersionConverters/AssemblyInfo/AddFormats/VersionAssemblyInfo.fs rename to src/GitVersion.Output/AssemblyInfo/AddFormats/VersionAssemblyInfo.fs diff --git a/src/GitVersion.Core/VersionConverters/AssemblyInfo/AddFormats/VersionAssemblyInfo.vb b/src/GitVersion.Output/AssemblyInfo/AddFormats/VersionAssemblyInfo.vb similarity index 100% rename from src/GitVersion.Core/VersionConverters/AssemblyInfo/AddFormats/VersionAssemblyInfo.vb rename to src/GitVersion.Output/AssemblyInfo/AddFormats/VersionAssemblyInfo.vb diff --git a/src/GitVersion.Core/VersionConverters/AssemblyInfo/AssemblyInfoContext.cs b/src/GitVersion.Output/AssemblyInfo/AssemblyInfoContext.cs similarity index 89% rename from src/GitVersion.Core/VersionConverters/AssemblyInfo/AssemblyInfoContext.cs rename to src/GitVersion.Output/AssemblyInfo/AssemblyInfoContext.cs index 1f9b3586a0..deacb81c8f 100644 --- a/src/GitVersion.Core/VersionConverters/AssemblyInfo/AssemblyInfoContext.cs +++ b/src/GitVersion.Output/AssemblyInfo/AssemblyInfoContext.cs @@ -1,4 +1,4 @@ -namespace GitVersion.VersionConverters.AssemblyInfo; +namespace GitVersion.Output.AssemblyInfo; public readonly struct AssemblyInfoContext : IConverterContext { diff --git a/src/GitVersion.Core/VersionConverters/AssemblyInfo/AssemblyInfoFileUpdater.cs b/src/GitVersion.Output/AssemblyInfo/AssemblyInfoFileUpdater.cs similarity index 99% rename from src/GitVersion.Core/VersionConverters/AssemblyInfo/AssemblyInfoFileUpdater.cs rename to src/GitVersion.Output/AssemblyInfo/AssemblyInfoFileUpdater.cs index 3723391367..daca77d9b8 100644 --- a/src/GitVersion.Core/VersionConverters/AssemblyInfo/AssemblyInfoFileUpdater.cs +++ b/src/GitVersion.Output/AssemblyInfo/AssemblyInfoFileUpdater.cs @@ -4,7 +4,7 @@ using GitVersion.Logging; using GitVersion.OutputVariables; -namespace GitVersion.VersionConverters.AssemblyInfo; +namespace GitVersion.Output.AssemblyInfo; public interface IAssemblyInfoFileUpdater : IVersionConverter { diff --git a/src/GitVersion.Core/VersionConverters/AssemblyInfo/ProjectFileUpdater.cs b/src/GitVersion.Output/AssemblyInfo/ProjectFileUpdater.cs similarity index 99% rename from src/GitVersion.Core/VersionConverters/AssemblyInfo/ProjectFileUpdater.cs rename to src/GitVersion.Output/AssemblyInfo/ProjectFileUpdater.cs index 73c69b7b93..d75dce7ab8 100644 --- a/src/GitVersion.Core/VersionConverters/AssemblyInfo/ProjectFileUpdater.cs +++ b/src/GitVersion.Output/AssemblyInfo/ProjectFileUpdater.cs @@ -4,7 +4,7 @@ using GitVersion.Logging; using GitVersion.OutputVariables; -namespace GitVersion.VersionConverters.AssemblyInfo; +namespace GitVersion.Output.AssemblyInfo; public interface IProjectFileUpdater : IVersionConverter { diff --git a/src/GitVersion.Core/VersionConverters/AssemblyInfo/Templates/VersionAssemblyInfo.cs b/src/GitVersion.Output/AssemblyInfo/Templates/VersionAssemblyInfo.cs similarity index 100% rename from src/GitVersion.Core/VersionConverters/AssemblyInfo/Templates/VersionAssemblyInfo.cs rename to src/GitVersion.Output/AssemblyInfo/Templates/VersionAssemblyInfo.cs diff --git a/src/GitVersion.Core/VersionConverters/AssemblyInfo/Templates/VersionAssemblyInfo.fs b/src/GitVersion.Output/AssemblyInfo/Templates/VersionAssemblyInfo.fs similarity index 100% rename from src/GitVersion.Core/VersionConverters/AssemblyInfo/Templates/VersionAssemblyInfo.fs rename to src/GitVersion.Output/AssemblyInfo/Templates/VersionAssemblyInfo.fs diff --git a/src/GitVersion.Core/VersionConverters/AssemblyInfo/Templates/VersionAssemblyInfo.vb b/src/GitVersion.Output/AssemblyInfo/Templates/VersionAssemblyInfo.vb similarity index 100% rename from src/GitVersion.Core/VersionConverters/AssemblyInfo/Templates/VersionAssemblyInfo.vb rename to src/GitVersion.Output/AssemblyInfo/Templates/VersionAssemblyInfo.vb diff --git a/src/GitVersion.Output/GitVersion.Output.csproj b/src/GitVersion.Output/GitVersion.Output.csproj new file mode 100644 index 0000000000..dd353f5de9 --- /dev/null +++ b/src/GitVersion.Output/GitVersion.Output.csproj @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/src/GitVersion.Core/VersionConverters/GitVersionInfo/AddFormats/GitVersionInformation.cs b/src/GitVersion.Output/GitVersionInfo/AddFormats/GitVersionInformation.cs similarity index 100% rename from src/GitVersion.Core/VersionConverters/GitVersionInfo/AddFormats/GitVersionInformation.cs rename to src/GitVersion.Output/GitVersionInfo/AddFormats/GitVersionInformation.cs diff --git a/src/GitVersion.Core/VersionConverters/GitVersionInfo/AddFormats/GitVersionInformation.fs b/src/GitVersion.Output/GitVersionInfo/AddFormats/GitVersionInformation.fs similarity index 100% rename from src/GitVersion.Core/VersionConverters/GitVersionInfo/AddFormats/GitVersionInformation.fs rename to src/GitVersion.Output/GitVersionInfo/AddFormats/GitVersionInformation.fs diff --git a/src/GitVersion.Core/VersionConverters/GitVersionInfo/AddFormats/GitVersionInformation.vb b/src/GitVersion.Output/GitVersionInfo/AddFormats/GitVersionInformation.vb similarity index 100% rename from src/GitVersion.Core/VersionConverters/GitVersionInfo/AddFormats/GitVersionInformation.vb rename to src/GitVersion.Output/GitVersionInfo/AddFormats/GitVersionInformation.vb diff --git a/src/GitVersion.Core/VersionConverters/GitVersionInfo/GitVersionInfoContext.cs b/src/GitVersion.Output/GitVersionInfo/GitVersionInfoContext.cs similarity index 88% rename from src/GitVersion.Core/VersionConverters/GitVersionInfo/GitVersionInfoContext.cs rename to src/GitVersion.Output/GitVersionInfo/GitVersionInfoContext.cs index ddccc5b0ce..cc02b10f7e 100644 --- a/src/GitVersion.Core/VersionConverters/GitVersionInfo/GitVersionInfoContext.cs +++ b/src/GitVersion.Output/GitVersionInfo/GitVersionInfoContext.cs @@ -1,4 +1,4 @@ -namespace GitVersion.VersionConverters.GitVersionInfo; +namespace GitVersion.Output.GitVersionInfo; public readonly struct GitVersionInfoContext : IConverterContext { diff --git a/src/GitVersion.Core/VersionConverters/GitVersionInfo/GitVersionInfoGenerator.cs b/src/GitVersion.Output/GitVersionInfo/GitVersionInfoGenerator.cs similarity index 97% rename from src/GitVersion.Core/VersionConverters/GitVersionInfo/GitVersionInfoGenerator.cs rename to src/GitVersion.Output/GitVersionInfo/GitVersionInfoGenerator.cs index e02971218e..c196e72c39 100644 --- a/src/GitVersion.Core/VersionConverters/GitVersionInfo/GitVersionInfoGenerator.cs +++ b/src/GitVersion.Output/GitVersionInfo/GitVersionInfoGenerator.cs @@ -2,7 +2,7 @@ using GitVersion.Helpers; using GitVersion.OutputVariables; -namespace GitVersion.VersionConverters.GitVersionInfo; +namespace GitVersion.Output.GitVersionInfo; public interface IGitVersionInfoGenerator : IVersionConverter { diff --git a/src/GitVersion.Core/VersionConverters/GitVersionInfo/Templates/GitVersionInformation.cs b/src/GitVersion.Output/GitVersionInfo/Templates/GitVersionInformation.cs similarity index 100% rename from src/GitVersion.Core/VersionConverters/GitVersionInfo/Templates/GitVersionInformation.cs rename to src/GitVersion.Output/GitVersionInfo/Templates/GitVersionInformation.cs diff --git a/src/GitVersion.Core/VersionConverters/GitVersionInfo/Templates/GitVersionInformation.fs b/src/GitVersion.Output/GitVersionInfo/Templates/GitVersionInformation.fs similarity index 100% rename from src/GitVersion.Core/VersionConverters/GitVersionInfo/Templates/GitVersionInformation.fs rename to src/GitVersion.Output/GitVersionInfo/Templates/GitVersionInformation.fs diff --git a/src/GitVersion.Core/VersionConverters/GitVersionInfo/Templates/GitVersionInformation.vb b/src/GitVersion.Output/GitVersionInfo/Templates/GitVersionInformation.vb similarity index 100% rename from src/GitVersion.Core/VersionConverters/GitVersionInfo/Templates/GitVersionInformation.vb rename to src/GitVersion.Output/GitVersionInfo/Templates/GitVersionInformation.vb diff --git a/src/GitVersion.Core/VersionConverters/VersionConvertersModule.cs b/src/GitVersion.Output/GitVersionOutputModule.cs similarity index 62% rename from src/GitVersion.Core/VersionConverters/VersionConvertersModule.cs rename to src/GitVersion.Output/GitVersionOutputModule.cs index 938c3a2f13..45b75136a5 100644 --- a/src/GitVersion.Core/VersionConverters/VersionConvertersModule.cs +++ b/src/GitVersion.Output/GitVersionOutputModule.cs @@ -1,15 +1,16 @@ -using GitVersion.VersionConverters.AssemblyInfo; -using GitVersion.VersionConverters.GitVersionInfo; -using GitVersion.VersionConverters.OutputGenerator; -using GitVersion.VersionConverters.WixUpdater; +using GitVersion.Output.AssemblyInfo; +using GitVersion.Output.GitVersionInfo; +using GitVersion.Output.OutputGenerator; +using GitVersion.Output.WixUpdater; using Microsoft.Extensions.DependencyInjection; -namespace GitVersion.VersionConverters; +namespace GitVersion.Output; -public class VersionConvertersModule : IGitVersionModule +public class GitVersionOutputModule : IGitVersionModule { public void RegisterTypes(IServiceCollection services) { + services.AddSingleton(); services.AddSingleton(); services.AddSingleton(); services.AddSingleton(); diff --git a/src/GitVersion.Core/Core/GitVersionOutputTool.cs b/src/GitVersion.Output/GitVersionOutputTool.cs similarity index 93% rename from src/GitVersion.Core/Core/GitVersionOutputTool.cs rename to src/GitVersion.Output/GitVersionOutputTool.cs index 2de67aeb6a..7dafca0e8f 100644 --- a/src/GitVersion.Core/Core/GitVersionOutputTool.cs +++ b/src/GitVersion.Output/GitVersionOutputTool.cs @@ -1,9 +1,9 @@ using GitVersion.Extensions; +using GitVersion.Output.AssemblyInfo; +using GitVersion.Output.GitVersionInfo; +using GitVersion.Output.OutputGenerator; +using GitVersion.Output.WixUpdater; using GitVersion.OutputVariables; -using GitVersion.VersionConverters.AssemblyInfo; -using GitVersion.VersionConverters.GitVersionInfo; -using GitVersion.VersionConverters.OutputGenerator; -using GitVersion.VersionConverters.WixUpdater; using Microsoft.Extensions.Options; namespace GitVersion; diff --git a/src/GitVersion.Core/VersionConverters/OutputGenerator/OutputContext.cs b/src/GitVersion.Output/OutputGenerator/OutputContext.cs similarity index 88% rename from src/GitVersion.Core/VersionConverters/OutputGenerator/OutputContext.cs rename to src/GitVersion.Output/OutputGenerator/OutputContext.cs index a3447ca4f7..42de7bd00a 100644 --- a/src/GitVersion.Core/VersionConverters/OutputGenerator/OutputContext.cs +++ b/src/GitVersion.Output/OutputGenerator/OutputContext.cs @@ -1,4 +1,4 @@ -namespace GitVersion.VersionConverters.OutputGenerator; +namespace GitVersion.Output.OutputGenerator; public readonly struct OutputContext : IConverterContext { diff --git a/src/GitVersion.Core/VersionConverters/OutputGenerator/OutputGenerator.cs b/src/GitVersion.Output/OutputGenerator/OutputGenerator.cs similarity index 97% rename from src/GitVersion.Core/VersionConverters/OutputGenerator/OutputGenerator.cs rename to src/GitVersion.Output/OutputGenerator/OutputGenerator.cs index f4c9eb67f8..1c9fd049eb 100644 --- a/src/GitVersion.Core/VersionConverters/OutputGenerator/OutputGenerator.cs +++ b/src/GitVersion.Output/OutputGenerator/OutputGenerator.cs @@ -5,7 +5,7 @@ using GitVersion.OutputVariables; using Microsoft.Extensions.Options; -namespace GitVersion.VersionConverters.OutputGenerator; +namespace GitVersion.Output.OutputGenerator; public interface IOutputGenerator : IVersionConverter { diff --git a/src/GitVersion.Output/PublicAPI.Shipped.txt b/src/GitVersion.Output/PublicAPI.Shipped.txt new file mode 100644 index 0000000000..ab058de62d --- /dev/null +++ b/src/GitVersion.Output/PublicAPI.Shipped.txt @@ -0,0 +1 @@ +#nullable enable diff --git a/src/GitVersion.Output/PublicAPI.Unshipped.txt b/src/GitVersion.Output/PublicAPI.Unshipped.txt new file mode 100644 index 0000000000..d4beec96d3 --- /dev/null +++ b/src/GitVersion.Output/PublicAPI.Unshipped.txt @@ -0,0 +1,60 @@ +#nullable enable +GitVersion.GitVersionOutputTool +GitVersion.GitVersionOutputTool.GenerateGitVersionInformation(GitVersion.OutputVariables.VersionVariables! variables, GitVersion.FileWriteInfo! fileWriteInfo) -> void +GitVersion.GitVersionOutputTool.GitVersionOutputTool(Microsoft.Extensions.Options.IOptions! options, GitVersion.Output.OutputGenerator.IOutputGenerator! outputGenerator, GitVersion.Output.WixUpdater.IWixVersionFileUpdater! wixVersionFileUpdater, GitVersion.Output.GitVersionInfo.IGitVersionInfoGenerator! gitVersionInfoGenerator, GitVersion.Output.AssemblyInfo.IAssemblyInfoFileUpdater! assemblyInfoFileUpdater, GitVersion.Output.AssemblyInfo.IProjectFileUpdater! projectFileUpdater) -> void +GitVersion.GitVersionOutputTool.OutputVariables(GitVersion.OutputVariables.VersionVariables! variables, bool updateBuildNumber) -> void +GitVersion.GitVersionOutputTool.UpdateAssemblyInfo(GitVersion.OutputVariables.VersionVariables! variables) -> void +GitVersion.GitVersionOutputTool.UpdateWixVersionFile(GitVersion.OutputVariables.VersionVariables! variables) -> void +GitVersion.Output.AssemblyInfo.AssemblyInfoContext +GitVersion.Output.AssemblyInfo.AssemblyInfoContext.AssemblyInfoContext() -> void +GitVersion.Output.AssemblyInfo.AssemblyInfoContext.AssemblyInfoContext(string! workingDirectory, bool ensureAssemblyInfo, params string![]! assemblyInfoFiles) -> void +GitVersion.Output.AssemblyInfo.AssemblyInfoContext.AssemblyInfoFiles.get -> string![]! +GitVersion.Output.AssemblyInfo.AssemblyInfoContext.EnsureAssemblyInfo.get -> bool +GitVersion.Output.AssemblyInfo.AssemblyInfoContext.WorkingDirectory.get -> string! +GitVersion.Output.AssemblyInfo.AssemblyInfoFileUpdater +GitVersion.Output.AssemblyInfo.AssemblyInfoFileUpdater.AssemblyInfoFileUpdater(GitVersion.Logging.ILog! log, GitVersion.IFileSystem! fileSystem) -> void +GitVersion.Output.AssemblyInfo.AssemblyInfoFileUpdater.Dispose() -> void +GitVersion.Output.AssemblyInfo.AssemblyInfoFileUpdater.Execute(GitVersion.OutputVariables.VersionVariables! variables, GitVersion.Output.AssemblyInfo.AssemblyInfoContext context) -> void +GitVersion.Output.AssemblyInfo.IAssemblyInfoFileUpdater +GitVersion.Output.AssemblyInfo.IProjectFileUpdater +GitVersion.Output.AssemblyInfo.IProjectFileUpdater.CanUpdateProjectFile(System.Xml.Linq.XElement! xmlRoot) -> bool +GitVersion.Output.AssemblyInfo.ProjectFileUpdater +GitVersion.Output.AssemblyInfo.ProjectFileUpdater.CanUpdateProjectFile(System.Xml.Linq.XElement! xmlRoot) -> bool +GitVersion.Output.AssemblyInfo.ProjectFileUpdater.Dispose() -> void +GitVersion.Output.AssemblyInfo.ProjectFileUpdater.Execute(GitVersion.OutputVariables.VersionVariables! variables, GitVersion.Output.AssemblyInfo.AssemblyInfoContext context) -> void +GitVersion.Output.AssemblyInfo.ProjectFileUpdater.ProjectFileUpdater(GitVersion.Logging.ILog! log, GitVersion.IFileSystem! fileSystem) -> void +GitVersion.Output.GitVersionInfo.GitVersionInfoContext +GitVersion.Output.GitVersionInfo.GitVersionInfoContext.FileExtension.get -> string! +GitVersion.Output.GitVersionInfo.GitVersionInfoContext.FileName.get -> string! +GitVersion.Output.GitVersionInfo.GitVersionInfoContext.GitVersionInfoContext() -> void +GitVersion.Output.GitVersionInfo.GitVersionInfoContext.GitVersionInfoContext(string! workingDirectory, string! fileName, string! fileExtension) -> void +GitVersion.Output.GitVersionInfo.GitVersionInfoContext.WorkingDirectory.get -> string! +GitVersion.Output.GitVersionInfo.GitVersionInfoGenerator +GitVersion.Output.GitVersionInfo.GitVersionInfoGenerator.Dispose() -> void +GitVersion.Output.GitVersionInfo.GitVersionInfoGenerator.Execute(GitVersion.OutputVariables.VersionVariables! variables, GitVersion.Output.GitVersionInfo.GitVersionInfoContext context) -> void +GitVersion.Output.GitVersionInfo.GitVersionInfoGenerator.GitVersionInfoGenerator(GitVersion.IFileSystem! fileSystem) -> void +GitVersion.Output.GitVersionInfo.IGitVersionInfoGenerator +GitVersion.Output.GitVersionOutputModule +GitVersion.Output.GitVersionOutputModule.GitVersionOutputModule() -> void +GitVersion.Output.GitVersionOutputModule.RegisterTypes(Microsoft.Extensions.DependencyInjection.IServiceCollection! services) -> void +GitVersion.Output.OutputGenerator.IOutputGenerator +GitVersion.Output.OutputGenerator.OutputContext +GitVersion.Output.OutputGenerator.OutputContext.OutputContext() -> void +GitVersion.Output.OutputGenerator.OutputContext.OutputContext(string! workingDirectory, string? outputFile, bool? updateBuildNumber) -> void +GitVersion.Output.OutputGenerator.OutputContext.OutputFile.get -> string? +GitVersion.Output.OutputGenerator.OutputContext.UpdateBuildNumber.get -> bool? +GitVersion.Output.OutputGenerator.OutputContext.WorkingDirectory.get -> string! +GitVersion.Output.OutputGenerator.OutputGenerator +GitVersion.Output.OutputGenerator.OutputGenerator.Dispose() -> void +GitVersion.Output.OutputGenerator.OutputGenerator.Execute(GitVersion.OutputVariables.VersionVariables! variables, GitVersion.Output.OutputGenerator.OutputContext context) -> void +GitVersion.Output.OutputGenerator.OutputGenerator.OutputGenerator(GitVersion.BuildAgents.ICurrentBuildAgent! buildAgent, GitVersion.Logging.IConsole! console, GitVersion.IFileSystem! fileSystem, Microsoft.Extensions.Options.IOptions! options) -> void +GitVersion.Output.WixUpdater.IWixVersionFileUpdater +GitVersion.Output.WixUpdater.WixVersionContext +GitVersion.Output.WixUpdater.WixVersionContext.WixVersionContext() -> void +GitVersion.Output.WixUpdater.WixVersionContext.WixVersionContext(string! workingDirectory) -> void +GitVersion.Output.WixUpdater.WixVersionContext.WorkingDirectory.get -> string! +GitVersion.Output.WixUpdater.WixVersionFileUpdater +GitVersion.Output.WixUpdater.WixVersionFileUpdater.Dispose() -> void +GitVersion.Output.WixUpdater.WixVersionFileUpdater.Execute(GitVersion.OutputVariables.VersionVariables! variables, GitVersion.Output.WixUpdater.WixVersionContext context) -> void +GitVersion.Output.WixUpdater.WixVersionFileUpdater.WixVersionFileUpdater(GitVersion.Logging.ILog! log, GitVersion.IFileSystem! fileSystem) -> void +const GitVersion.Output.WixUpdater.WixVersionFileUpdater.WixVersionFileName = "GitVersion_WixVersion.wxi" -> string! diff --git a/src/GitVersion.Core/VersionConverters/TemplateManager.cs b/src/GitVersion.Output/TemplateManager.cs similarity index 98% rename from src/GitVersion.Core/VersionConverters/TemplateManager.cs rename to src/GitVersion.Output/TemplateManager.cs index 5564904740..7802e0a5be 100644 --- a/src/GitVersion.Core/VersionConverters/TemplateManager.cs +++ b/src/GitVersion.Output/TemplateManager.cs @@ -1,6 +1,6 @@ using GitVersion.Extensions; -namespace GitVersion.VersionConverters; +namespace GitVersion.Output; internal enum TemplateType { diff --git a/src/GitVersion.Core/VersionConverters/WixUpdater/WixVersionContext.cs b/src/GitVersion.Output/WixUpdater/WixVersionContext.cs similarity index 80% rename from src/GitVersion.Core/VersionConverters/WixUpdater/WixVersionContext.cs rename to src/GitVersion.Output/WixUpdater/WixVersionContext.cs index c90e5ced8a..e8d2ad1700 100644 --- a/src/GitVersion.Core/VersionConverters/WixUpdater/WixVersionContext.cs +++ b/src/GitVersion.Output/WixUpdater/WixVersionContext.cs @@ -1,4 +1,4 @@ -namespace GitVersion.VersionConverters.WixUpdater; +namespace GitVersion.Output.WixUpdater; public readonly struct WixVersionContext : IConverterContext { diff --git a/src/GitVersion.Core/VersionConverters/WixUpdater/WixVersionFileUpdater.cs b/src/GitVersion.Output/WixUpdater/WixVersionFileUpdater.cs similarity index 97% rename from src/GitVersion.Core/VersionConverters/WixUpdater/WixVersionFileUpdater.cs rename to src/GitVersion.Output/WixUpdater/WixVersionFileUpdater.cs index f3897f1cc9..f9eb7be6de 100644 --- a/src/GitVersion.Core/VersionConverters/WixUpdater/WixVersionFileUpdater.cs +++ b/src/GitVersion.Output/WixUpdater/WixVersionFileUpdater.cs @@ -3,7 +3,7 @@ using GitVersion.Logging; using GitVersion.OutputVariables; -namespace GitVersion.VersionConverters.WixUpdater; +namespace GitVersion.Output.WixUpdater; public interface IWixVersionFileUpdater : IVersionConverter { diff --git a/src/GitVersion.sln b/src/GitVersion.sln index 63d0aca254..c717749269 100644 --- a/src/GitVersion.sln +++ b/src/GitVersion.sln @@ -36,6 +36,12 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GitVersion.BuildAgents", "G EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GitVersion.BuildAgents.Tests", "GitVersion.BuildAgents.Tests\GitVersion.BuildAgents.Tests.csproj", "{85060C01-6DAF-48E9-9D7E-AEDA8FFEB0DD}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GitVersion.Output", "GitVersion.Output\GitVersion.Output.csproj", "{843450BC-3A6D-4DA6-8520-2D9A9C8218AC}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GitVersion.Output.Tests", "GitVersion.Output.Tests\GitVersion.Output.Tests.csproj", "{13C60949-7225-4B08-BE63-CAAC5E25FD16}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Modules", "Modules", "{69C36B9D-E496-42A2-B091-C055E999686C}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -82,6 +88,14 @@ Global {85060C01-6DAF-48E9-9D7E-AEDA8FFEB0DD}.Debug|Any CPU.Build.0 = Debug|Any CPU {85060C01-6DAF-48E9-9D7E-AEDA8FFEB0DD}.Release|Any CPU.ActiveCfg = Release|Any CPU {85060C01-6DAF-48E9-9D7E-AEDA8FFEB0DD}.Release|Any CPU.Build.0 = Release|Any CPU + {843450BC-3A6D-4DA6-8520-2D9A9C8218AC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {843450BC-3A6D-4DA6-8520-2D9A9C8218AC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {843450BC-3A6D-4DA6-8520-2D9A9C8218AC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {843450BC-3A6D-4DA6-8520-2D9A9C8218AC}.Release|Any CPU.Build.0 = Release|Any CPU + {13C60949-7225-4B08-BE63-CAAC5E25FD16}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {13C60949-7225-4B08-BE63-CAAC5E25FD16}.Debug|Any CPU.Build.0 = Debug|Any CPU + {13C60949-7225-4B08-BE63-CAAC5E25FD16}.Release|Any CPU.ActiveCfg = Release|Any CPU + {13C60949-7225-4B08-BE63-CAAC5E25FD16}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -89,4 +103,10 @@ Global GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {0C1C310E-7A4D-4032-878B-6DC375894C49} EndGlobalSection + GlobalSection(NestedProjects) = preSolution + {B1C486D2-2B07-42D6-86AE-3F9AD50F27C8} = {69C36B9D-E496-42A2-B091-C055E999686C} + {85060C01-6DAF-48E9-9D7E-AEDA8FFEB0DD} = {69C36B9D-E496-42A2-B091-C055E999686C} + {843450BC-3A6D-4DA6-8520-2D9A9C8218AC} = {69C36B9D-E496-42A2-B091-C055E999686C} + {13C60949-7225-4B08-BE63-CAAC5E25FD16} = {69C36B9D-E496-42A2-B091-C055E999686C} + EndGlobalSection EndGlobal