@joebigelow / wix / commits / 5b48edfd

Add version info to help command

Output semver as the first line of the header Moved version info to WixBranding Additional separator Remove alternate help command Changed to use 'ProductVersion' Updated VersionCommand to output semantic version in the same fashion as the logo Remove whitespace Revert version command to GitInfo Revert all changes to the version command Remove unused ServiceProvider from the version command

Mark Stega committed Jan 5, 2022 at 13:50 UTC 5b48edfd77da6a7f1c499ad30ea95b66f26ee56d
4 files changed +4 -3
src/wix/WixToolset.Core/CommandLine/CommandLine.cs
+1 -1
@@ -56,7 +56,7 @@ namespace WixToolset.Core.CommandLine
56 if (command.ShowLogo)
57 {
58 var branding = this.ServiceProvider.GetService<IWixBranding>();
59 - Console.WriteLine(branding.ReplacePlaceholders("[AssemblyProduct] [AssemblyDescription] version [FileVersion]"));
59 + Console.WriteLine(branding.ReplacePlaceholders("[AssemblyProduct] [AssemblyDescription] version [ProductVersion]"));
60 Console.WriteLine(branding.ReplacePlaceholders("[AssemblyCopyright]"));
61 }
62
src/wix/WixToolset.Core/CommandLine/HelpCommand.cs
+1 -1
@@ -54,7 +54,7 @@ namespace WixToolset.Core.CommandLine
54 }
55
56 Console.WriteLine();
57 - Console.WriteLine("Run 'wix [command] --help' for more information on a command.");
57 + Console.WriteLine("Run 'wix [command] -h[elp]' for more information on a command.");
58 Console.WriteLine();
59 Console.WriteLine(this.Branding.ReplacePlaceholders("For more information see: [SupportUrl]"));
60
src/wix/WixToolset.Core/CommandLine/VersionCommand.cs
-1
@@ -22,7 +22,6 @@ namespace WixToolset.Core.CommandLine
22 , ThisAssembly.Git.BaseVersion.Patch
23 , ThisAssembly.Git.SemVer.DashLabel
24 , ThisAssembly.Git.Commit);
25 -
25 return Task.FromResult(0);
26 }
27
src/wix/WixToolset.Core/ExtensibilityServices/WixBranding.cs
+2
@@ -61,6 +61,7 @@ namespace WixToolset.Core.ExtensibilityServices
61
62 original = original.Replace("[FileCopyright]", commonFileVersion.LegalCopyright);
63 original = original.Replace("[FileVersion]", commonFileVersion.FileVersion);
64 + original = original.Replace("[ProductVersion]", commonFileVersion.ProductVersion);
65 }
66
67 var fileVersion = FileVersionInfo.GetVersionInfo(assembly.Location);
@@ -69,6 +70,7 @@ namespace WixToolset.Core.ExtensibilityServices
70 original = original.Replace("[FileCopyright]", fileVersion.LegalCopyright);
71 original = original.Replace("[FileProductName]", fileVersion.ProductName);
72 original = original.Replace("[FileVersion]", fileVersion.FileVersion);
73 + original = original.Replace("[ProductVersion]", fileVersion.ProductVersion);
74
75 if (original.Contains("[FileVersionMajorMinor]"))
76 {