mirror of
https://github.com/quamotion/dotnet-packaging.git
synced 2026-07-08 18:06:08 +00:00
Merge pull request #136 from qmfrederik/features/version-flag
Add --version option
This commit is contained in:
@@ -63,8 +63,12 @@ namespace Dotnet.Packaging
|
||||
"Do not restore the project before building.",
|
||||
CommandOptionType.NoValue);
|
||||
|
||||
commandLineApplication.VersionOption("-v | --version", new Version(ThisAssembly.AssemblyFileVersion).ToString(3), ThisAssembly.AssemblyInformationalVersion);
|
||||
|
||||
commandLineApplication.HelpOption("-? | -h | --help");
|
||||
commandLineApplication.Name = $"dotnet {this.commandName}";
|
||||
commandLineApplication.FullName = $"dotnet {this.commandName}";
|
||||
commandLineApplication.ShortVersionGetter = () => new Version(ThisAssembly.AssemblyFileVersion).ToString(3);
|
||||
commandLineApplication.LongVersionGetter = () => ThisAssembly.AssemblyInformationalVersion;
|
||||
|
||||
commandLineApplication.ExtendedHelpText = $"{Environment.NewLine}See https://github.com/qmfrederik/dotnet-packaging for more information";
|
||||
|
||||
Reference in New Issue
Block a user