
- 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.
21 lines
615 B
C#
21 lines
615 B
C#
using System;
|
|
|
|
namespace Microsoft.DotNet.ProjectModel
|
|
{
|
|
public class ProjectReaderSettings
|
|
{
|
|
public string VersionSuffix { get; set; }
|
|
public string AssemblyFileVersion { get; set; }
|
|
|
|
public static ProjectReaderSettings ReadFromEnvironment()
|
|
{
|
|
var settings = new ProjectReaderSettings
|
|
{
|
|
VersionSuffix = Environment.GetEnvironmentVariable("DOTNET_BUILD_VERSION"),
|
|
AssemblyFileVersion = Environment.GetEnvironmentVariable("DOTNET_ASSEMBLY_FILE_VERSION")
|
|
};
|
|
|
|
return settings;
|
|
}
|
|
}
|
|
}
|