Fixing versions
- Added --version-suffix to build and publish - Support reading DOTNET_* version variables everywhere versions can be read - Show the commit sha in dotnet --version - Added tests that check the assembly output version - Set DOTNET_BUILD_VERSION when producing the CLI app itself so that it has the version information stamped in for help.
This commit is contained in:
parent
02e39cf81d
commit
69b5e3f815
17 changed files with 297 additions and 35 deletions
|
@ -16,6 +16,7 @@ namespace Microsoft.DotNet.Tools.Test.Utilities
|
|||
private string _buidBasePathDirectory;
|
||||
private string _configuration;
|
||||
private string _framework;
|
||||
private string _versionSuffix;
|
||||
private bool _noHost;
|
||||
private bool _native;
|
||||
private string _architecture;
|
||||
|
@ -66,6 +67,16 @@ namespace Microsoft.DotNet.Tools.Test.Utilities
|
|||
$"--framework {_framework}";
|
||||
}
|
||||
}
|
||||
|
||||
private string VersionSuffixOption
|
||||
{
|
||||
get
|
||||
{
|
||||
return _versionSuffix == string.Empty ?
|
||||
"" :
|
||||
$"--version-suffix {_versionSuffix}";
|
||||
}
|
||||
}
|
||||
|
||||
private string NoHostOption
|
||||
{
|
||||
|
@ -183,6 +194,7 @@ namespace Microsoft.DotNet.Tools.Test.Utilities
|
|||
string buidBasePath="",
|
||||
string configuration="",
|
||||
string framework="",
|
||||
string versionSuffix="",
|
||||
bool noHost=false,
|
||||
bool native=false,
|
||||
string architecture="",
|
||||
|
@ -203,6 +215,7 @@ namespace Microsoft.DotNet.Tools.Test.Utilities
|
|||
_outputDirectory = output;
|
||||
_buidBasePathDirectory = buidBasePath;
|
||||
_configuration = configuration;
|
||||
_versionSuffix = versionSuffix;
|
||||
_framework = framework;
|
||||
_noHost = noHost;
|
||||
_native = native;
|
||||
|
@ -238,7 +251,7 @@ namespace Microsoft.DotNet.Tools.Test.Utilities
|
|||
|
||||
private string BuildArgs()
|
||||
{
|
||||
return $"{BuildProfile} {NoDependencies} {NoIncremental} \"{_projectPath}\" {OutputOption} {BuildBasePathOption} {ConfigurationOption} {FrameworkOption} {NoHostOption} {NativeOption} {ArchitectureOption} {IlcArgsOption} {IlcPathOption} {AppDepSDKPathOption} {NativeCppModeOption} {CppCompilerFlagsOption}";
|
||||
return $"{BuildProfile} {NoDependencies} {NoIncremental} \"{_projectPath}\" {OutputOption} {BuildBasePathOption} {ConfigurationOption} {FrameworkOption} {VersionSuffixOption} {NoHostOption} {NativeOption} {ArchitectureOption} {IlcArgsOption} {IlcPathOption} {AppDepSDKPathOption} {NativeCppModeOption} {CppCompilerFlagsOption}";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue