dotnet-installer/src/Microsoft.DotNet.ProjectModel/ProjectReaderSettings.cs
David Fowler 69b5e3f815 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.
2016-02-18 01:10:07 -08:00

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;
}
}
}