Merge pull request #5265 from eerhardt/VersionUpdatesFixTests
Fix 'master' versions and tests
This commit is contained in:
commit
e6f865fc76
28 changed files with 92 additions and 169 deletions
|
@ -1,4 +1,6 @@
|
||||||
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<VersionPrefix>1.0.0-rc</VersionPrefix>
|
<VersionPrefix>1.0.0-rc</VersionPrefix>
|
||||||
<TargetFramework>netcoreapp1.0</TargetFramework>
|
<TargetFramework>netcoreapp1.0</TargetFramework>
|
||||||
|
@ -8,7 +10,7 @@
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<SdkNugetVersion Condition=" '$(SdkNugetVersion)' == ''">1.0.0-preview5-*</SdkNugetVersion>
|
<SdkNugetVersion Condition=" '$(SdkNugetVersion)' == ''">$(CliVersionPrefix)-*</SdkNugetVersion>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
<RuntimeIdentifiers>win7-x64;win7-x86;osx.10.11-x64;ubuntu.14.04-x64;ubuntu.16.04-x64;centos.7-x64;rhel.7.2-x64;debian.8-x64;fedora.23-x64;opensuse.13.2-x64;osx.10.10-x64;rhel.7-x64</RuntimeIdentifiers>
|
<RuntimeIdentifiers>win7-x64;win7-x86;osx.10.11-x64;ubuntu.14.04-x64;ubuntu.16.04-x64;centos.7-x64;rhel.7.2-x64;debian.8-x64;fedora.23-x64;opensuse.13.2-x64;osx.10.10-x64;rhel.7-x64</RuntimeIdentifiers>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup Condition=" '$(TargetFramework)' == 'netcoreapp1.0' ">
|
||||||
<BuiltProjectOutputGroupOutput Include="$(ProjectRuntimeConfigFilePath)">
|
<BuiltProjectOutputGroupOutput Include="$(ProjectRuntimeConfigFilePath)">
|
||||||
<FinalOutputPath>$(ProjectRuntimeConfigFilePath)</FinalOutputPath>
|
<FinalOutputPath>$(ProjectRuntimeConfigFilePath)</FinalOutputPath>
|
||||||
</BuiltProjectOutputGroupOutput>
|
</BuiltProjectOutputGroupOutput>
|
||||||
|
|
|
@ -12,9 +12,6 @@
|
||||||
<PackageReference Include="Newtonsoft.Json">
|
<PackageReference Include="Newtonsoft.Json">
|
||||||
<Version>5.0.0</Version>
|
<Version>5.0.0</Version>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="NuGet.Protocol.Core.v3">
|
|
||||||
<Version>3.3.0</Version>
|
|
||||||
</PackageReference>
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup Condition=" '$(TargetFramework)' == 'net451' ">
|
<ItemGroup Condition=" '$(TargetFramework)' == 'net451' ">
|
||||||
|
|
|
@ -1,9 +0,0 @@
|
||||||
# This is a file containing environment variables specific to this branch
|
|
||||||
# Any line that is not blank and does not start with '#' is interpreted as a variable to set
|
|
||||||
# Each line is expected to be in the format "[Name]=[Value]".
|
|
||||||
MAJOR_VERSION=2
|
|
||||||
MINOR_VERSION=0
|
|
||||||
PATCH_VERSION=0
|
|
||||||
RELEASE_SUFFIX=alpha
|
|
||||||
CHANNEL=master
|
|
||||||
BRANCH_NAME=master
|
|
|
@ -49,19 +49,17 @@
|
||||||
<Output TaskParameter="CommitHash" PropertyName="CommitHash" />
|
<Output TaskParameter="CommitHash" PropertyName="CommitHash" />
|
||||||
</GetCommitHash>
|
</GetCommitHash>
|
||||||
|
|
||||||
<GenerateBuildVersionInfo RepoRoot="$(RepoRoot)">
|
<GenerateBuildVersionInfo RepoRoot="$(RepoRoot)"
|
||||||
<Output TaskParameter="VersionMajor" PropertyName="VersionMajor" />
|
VersionMajor="$(VersionMajor)"
|
||||||
<Output TaskParameter="VersionMinor" PropertyName="VersionMinor" />
|
VersionMinor="$(VersionMinor)"
|
||||||
<Output TaskParameter="VersionPatch" PropertyName="VersionPatch" />
|
VersionPatch="$(VersionPatch)"
|
||||||
|
ReleaseSuffix="$(ReleaseSuffix)">
|
||||||
<Output TaskParameter="CommitCount" PropertyName="CommitCount" />
|
<Output TaskParameter="CommitCount" PropertyName="CommitCount" />
|
||||||
<Output TaskParameter="ReleaseSuffix" PropertyName="ReleaseSuffix" />
|
|
||||||
<Output TaskParameter="VersionSuffix" PropertyName="VersionSuffix" />
|
<Output TaskParameter="VersionSuffix" PropertyName="VersionSuffix" />
|
||||||
<Output TaskParameter="SimpleVersion" PropertyName="SimpleVersion" />
|
<Output TaskParameter="SimpleVersion" PropertyName="SimpleVersion" />
|
||||||
<Output TaskParameter="NugetVersion" PropertyName="NugetVersion" />
|
<Output TaskParameter="NugetVersion" PropertyName="NugetVersion" />
|
||||||
<Output TaskParameter="MsiVersion" PropertyName="MsiVersion" />
|
<Output TaskParameter="MsiVersion" PropertyName="MsiVersion" />
|
||||||
<Output TaskParameter="VersionBadgeMoniker" PropertyName="VersionBadgeMoniker" />
|
<Output TaskParameter="VersionBadgeMoniker" PropertyName="VersionBadgeMoniker" />
|
||||||
<Output TaskParameter="Channel" PropertyName="Channel" />
|
|
||||||
<Output TaskParameter="BranchName" PropertyName="BranchName" />
|
|
||||||
</GenerateBuildVersionInfo>
|
</GenerateBuildVersionInfo>
|
||||||
|
|
||||||
<GenerateNuGetPackagesArchiveVersion RepoRoot="$(RepoRoot)">
|
<GenerateNuGetPackagesArchiveVersion RepoRoot="$(RepoRoot)">
|
||||||
|
@ -72,9 +70,7 @@
|
||||||
<VersionBadge>$(BaseOutputDirectory)/$(VersionBadgeMoniker)_$(Configuration)_version_badge.svg</VersionBadge>
|
<VersionBadge>$(BaseOutputDirectory)/$(VersionBadgeMoniker)_$(Configuration)_version_badge.svg</VersionBadge>
|
||||||
<SdkVersion>$(NugetVersion)</SdkVersion>
|
<SdkVersion>$(NugetVersion)</SdkVersion>
|
||||||
|
|
||||||
<SdkNugetVersion>$(VersionMajor).$(VersionMinor).$(VersionPatch)-preview5-$(CommitCount)</SdkNugetVersion>
|
<SdkNugetVersion>$(SdkVersion)</SdkNugetVersion>
|
||||||
<ProjectModelNugetVersion>$(VersionMajor).$(VersionMinor).$(VersionPatch)-rc4-$(CommitCount)</ProjectModelNugetVersion>
|
|
||||||
<DependencyModelAndInternalAbstractionsNugetVersion>$(VersionMajor).$(VersionMinor).1-beta-$(CommitCount)</DependencyModelAndInternalAbstractionsNugetVersion>
|
|
||||||
|
|
||||||
<ArchiveExtension Condition=" '$(OSName)' == 'win' ">.zip</ArchiveExtension>
|
<ArchiveExtension Condition=" '$(OSName)' == 'win' ">.zip</ArchiveExtension>
|
||||||
<ArchiveExtension Condition=" '$(OSName)' != 'win' ">.tar.gz</ArchiveExtension>
|
<ArchiveExtension Condition=" '$(OSName)' != 'win' ">.tar.gz</ArchiveExtension>
|
||||||
|
|
|
@ -70,6 +70,8 @@
|
||||||
<TestDirectory>$(RepoRoot)/test/</TestDirectory>
|
<TestDirectory>$(RepoRoot)/test/</TestDirectory>
|
||||||
<DotnetUnderTest>$(Stage2Directory)</DotnetUnderTest>
|
<DotnetUnderTest>$(Stage2Directory)</DotnetUnderTest>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<MakeDir Directories="$(TestPackagesDir)" Condition="!Exists('$(TestPackagesDir)')"/>
|
||||||
</Target>
|
</Target>
|
||||||
|
|
||||||
<Target Name="BuildTests"
|
<Target Name="BuildTests"
|
||||||
|
@ -203,15 +205,27 @@
|
||||||
</Target>
|
</Target>
|
||||||
|
|
||||||
<Target Name="CreateTestAssetPackageNuPkgs"
|
<Target Name="CreateTestAssetPackageNuPkgs"
|
||||||
DependsOnTargets="BuildTestAssetPackageProjects;
|
DependsOnTargets="PrepareTests;
|
||||||
SetupTestPackageProjectData;"
|
SetupTestPackageProjectData;"
|
||||||
Inputs="%(TestPackageProject.PackInputs)"
|
Inputs="%(TestPackageProject.PackInputs)"
|
||||||
Outputs="%(TestPackageProject.PackOutputs)">
|
Outputs="%(TestPackageProject.PackOutputs)">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<DotNetPackMsbuildArgs>/p:TargetFramework=%(TestPackageProject.Framework)</DotNetPackMsbuildArgs>
|
<Framework>%(TestPackageProject.Framework)</Framework>
|
||||||
<DotNetPackMsbuildArgs Condition=" '$(IsDesktopAvailable)' == 'True' And '%(TestPackageProject.PackRuntime)' != '' ">/p:RuntimeIdentifier=%(TestPackageProject.PackRuntime)</DotNetPackMsbuildArgs>
|
<DoPackRuntime Condition=" '$(Framework)' == 'net45' Or '$(Framework)' == 'net451' ">true</DoPackRuntime>
|
||||||
|
<DotNetPackMsbuildArgs>/p:TargetFramework=$(Framework)</DotNetPackMsbuildArgs>
|
||||||
|
<DotNetPackMsbuildArgs Condition=" '$(IsDesktopAvailable)' == 'True' And '%(TestPackageProject.PackRuntime)' != '' And '$(DoPackRuntime)' != '' ">/p:RuntimeIdentifier=%(TestPackageProject.PackRuntime)</DotNetPackMsbuildArgs>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<DotNetRestore ToolPath="$(Stage2Directory)"
|
||||||
|
Source="$(TestPackagesDir)"
|
||||||
|
ConfigFile="$(RepoRoot)\NuGet.Config"
|
||||||
|
ProjectPath="%(TestPackageProject.ProjectPath)" />
|
||||||
|
|
||||||
|
<DotNetBuild Framework="$(Framework)"
|
||||||
|
Runtime="%(TestPackageProject.Runtime)"
|
||||||
|
ProjectPath="%(TestPackageProject.ProjectPath)"
|
||||||
|
ToolPath="$(Stage0Directory)" />
|
||||||
|
|
||||||
<!-- https://github.com/NuGet/Home/issues/4063 -->
|
<!-- https://github.com/NuGet/Home/issues/4063 -->
|
||||||
<DotNetPack NoBuild="True"
|
<DotNetPack NoBuild="True"
|
||||||
|
@ -221,24 +235,4 @@
|
||||||
VersionSuffix="%(TestPackageProject.VersionSuffix)"
|
VersionSuffix="%(TestPackageProject.VersionSuffix)"
|
||||||
MsbuildArgs="$(DotNetPackMsbuildArgs) /p:SdkNuGetVersion=$(SdkNugetVersion)" />
|
MsbuildArgs="$(DotNetPackMsbuildArgs) /p:SdkNuGetVersion=$(SdkNugetVersion)" />
|
||||||
</Target>
|
</Target>
|
||||||
|
|
||||||
<Target Name="BuildTestAssetPackageProjects"
|
|
||||||
DependsOnTargets="RestoreTestAssetPackageProjects;
|
|
||||||
SetupTestPackageProjectData;"
|
|
||||||
Inputs="%(TestPackageProject.BuildInputs)"
|
|
||||||
Outputs="%(TestPackageProject.BuildOutputs)">
|
|
||||||
|
|
||||||
<DotNetBuild Framework="%(TestPackageProject.Framework)"
|
|
||||||
Runtime="%(TestPackageProject.Runtime)"
|
|
||||||
ProjectPath="%(TestPackageProject.ProjectPath)"
|
|
||||||
ToolPath="$(Stage0Directory)" />
|
|
||||||
</Target>
|
|
||||||
|
|
||||||
<Target Name="RestoreTestAssetPackageProjects"
|
|
||||||
DependsOnTargets="PrepareTests;
|
|
||||||
SetupTestPackageProjectData;">
|
|
||||||
|
|
||||||
<DotNetRestore ToolPath="$(Stage2Directory)"
|
|
||||||
WorkingDirectory="%(TestPackageProject.FullPath)" />
|
|
||||||
</Target>
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
Output="$(NupkgOutputDirectory)"
|
Output="$(NupkgOutputDirectory)"
|
||||||
ProjectPath="%(ProjectsToPack.Identity)/%(ProjectsToPack.ProjectName).csproj"
|
ProjectPath="%(ProjectsToPack.Identity)/%(ProjectsToPack.ProjectName).csproj"
|
||||||
ToolPath="$(Stage0Directory)"
|
ToolPath="$(Stage0Directory)"
|
||||||
VersionSuffix="preview5-$(NupkgVersionSuffix)"
|
VersionSuffix="$(ReleaseSuffix)-$(NupkgVersionSuffix)"
|
||||||
Configuration="$(Configuration)" />
|
Configuration="$(Configuration)" />
|
||||||
</Target>
|
</Target>
|
||||||
|
|
||||||
|
|
|
@ -70,6 +70,26 @@
|
||||||
|
|
||||||
<Target Name="SetupTestPackageProjectBaseData">
|
<Target Name="SetupTestPackageProjectBaseData">
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
<BaseTestPackageProject Include="src/Microsoft.DotNet.Cli.Utils">
|
||||||
|
<Name>Microsoft.DotNet.Cli.Utils</Name>
|
||||||
|
<ProjectName>Microsoft.DotNet.Cli.Utils.csproj</ProjectName>
|
||||||
|
<IsTool>True</IsTool>
|
||||||
|
<IsApplicable>True</IsApplicable>
|
||||||
|
<VersionPrefix>$(CliVersionPrefix)-</VersionPrefix>
|
||||||
|
<VersionSuffix>$(ReleaseSuffix)-$(TestPackageBuildVersionSuffix)</VersionSuffix>
|
||||||
|
<Clean>False</Clean>
|
||||||
|
<Frameworks>netstandard1.5</Frameworks>
|
||||||
|
</BaseTestPackageProject>
|
||||||
|
<BaseTestPackageProject Include="src/Microsoft.DotNet.InternalAbstractions">
|
||||||
|
<Name>Microsoft.DotNet.InternalAbstractions</Name>
|
||||||
|
<ProjectName>Microsoft.DotNet.InternalAbstractions.csproj</ProjectName>
|
||||||
|
<IsTool>True</IsTool>
|
||||||
|
<IsApplicable>True</IsApplicable>
|
||||||
|
<VersionPrefix>2.0.0-beta-</VersionPrefix>
|
||||||
|
<VersionSuffix>beta-$(TestPackageBuildVersionSuffix)</VersionSuffix>
|
||||||
|
<Clean>False</Clean>
|
||||||
|
<Frameworks>netstandard1.3</Frameworks>
|
||||||
|
</BaseTestPackageProject>
|
||||||
<BaseTestPackageProject Include="TestAssets/TestPackages/PackageWithFakeNativeDep">
|
<BaseTestPackageProject Include="TestAssets/TestPackages/PackageWithFakeNativeDep">
|
||||||
<Name>PackageWithFakeNativeDep</Name>
|
<Name>PackageWithFakeNativeDep</Name>
|
||||||
<ProjectName>PackageWithFakeNativeDep.csproj</ProjectName>
|
<ProjectName>PackageWithFakeNativeDep.csproj</ProjectName>
|
||||||
|
@ -176,26 +196,6 @@
|
||||||
<Clean>True</Clean>
|
<Clean>True</Clean>
|
||||||
<Frameworks>netcoreapp1.0</Frameworks>
|
<Frameworks>netcoreapp1.0</Frameworks>
|
||||||
</BaseTestPackageProject>
|
</BaseTestPackageProject>
|
||||||
<BaseTestPackageProject Include="src/Microsoft.DotNet.Cli.Utils">
|
|
||||||
<Name>Microsoft.DotNet.Cli.Utils</Name>
|
|
||||||
<ProjectName>Microsoft.DotNet.Cli.Utils.csproj</ProjectName>
|
|
||||||
<IsTool>True</IsTool>
|
|
||||||
<IsApplicable>True</IsApplicable>
|
|
||||||
<VersionPrefix>1.0.0-preview5-</VersionPrefix>
|
|
||||||
<VersionSuffix>preview5-$(TestPackageBuildVersionSuffix)</VersionSuffix>
|
|
||||||
<Clean>False</Clean>
|
|
||||||
<Frameworks>netstandard1.5</Frameworks>
|
|
||||||
</BaseTestPackageProject>
|
|
||||||
<BaseTestPackageProject Include="src/Microsoft.DotNet.InternalAbstractions">
|
|
||||||
<Name>Microsoft.DotNet.InternalAbstractions</Name>
|
|
||||||
<ProjectName>Microsoft.DotNet.InternalAbstractions.csproj</ProjectName>
|
|
||||||
<IsTool>True</IsTool>
|
|
||||||
<IsApplicable>True</IsApplicable>
|
|
||||||
<VersionPrefix>2.0.0-beta-</VersionPrefix>
|
|
||||||
<VersionSuffix>beta-$(TestPackageBuildVersionSuffix)</VersionSuffix>
|
|
||||||
<Clean>False</Clean>
|
|
||||||
<Frameworks>netstandard1.3</Frameworks>
|
|
||||||
</BaseTestPackageProject>
|
|
||||||
|
|
||||||
<TestPackageProjectFrameworksExcludes Condition=" '$(IsDesktopAvailable)' != 'True' " Include="net45" />
|
<TestPackageProjectFrameworksExcludes Condition=" '$(IsDesktopAvailable)' != 'True' " Include="net45" />
|
||||||
<TestPackageProjectFrameworksExcludes Condition=" '$(IsDesktopAvailable)' != 'True' " Include="net451" />
|
<TestPackageProjectFrameworksExcludes Condition=" '$(IsDesktopAvailable)' != 'True' " Include="net451" />
|
||||||
|
|
|
@ -12,9 +12,11 @@ namespace Microsoft.DotNet.Cli.Build
|
||||||
|
|
||||||
protected override string Args
|
protected override string Args
|
||||||
{
|
{
|
||||||
get { return $"{GetProjectPath()} {GetSource()} {GetPackages()} {GetSkipInvalidConfigurations()} {GetRuntime()} {GetAdditionalParameters()}"; }
|
get { return $"{GetProjectPath()} {GetConfigFile()} {GetSource()} {GetPackages()} {GetSkipInvalidConfigurations()} {GetRuntime()} {GetAdditionalParameters()}"; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public string ConfigFile { get; set; }
|
||||||
|
|
||||||
public string AdditionalParameters { get; set; }
|
public string AdditionalParameters { get; set; }
|
||||||
|
|
||||||
public string ProjectPath { get; set; }
|
public string ProjectPath { get; set; }
|
||||||
|
@ -27,6 +29,16 @@ namespace Microsoft.DotNet.Cli.Build
|
||||||
|
|
||||||
public string Runtime { get; set; }
|
public string Runtime { get; set; }
|
||||||
|
|
||||||
|
private string GetConfigFile()
|
||||||
|
{
|
||||||
|
if (!string.IsNullOrEmpty(ConfigFile))
|
||||||
|
{
|
||||||
|
return $"--configfile {ConfigFile}";
|
||||||
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
private string GetSource()
|
private string GetSource()
|
||||||
{
|
{
|
||||||
if (!string.IsNullOrEmpty(Source))
|
if (!string.IsNullOrEmpty(Source))
|
||||||
|
|
|
@ -12,21 +12,21 @@ namespace Microsoft.DotNet.Cli.Build
|
||||||
[Required]
|
[Required]
|
||||||
public string RepoRoot { get; set; }
|
public string RepoRoot { get; set; }
|
||||||
|
|
||||||
[Output]
|
[Required]
|
||||||
public int VersionMajor { get; set; }
|
public int VersionMajor { get; set; }
|
||||||
|
|
||||||
[Output]
|
[Required]
|
||||||
public int VersionMinor { get; set; }
|
public int VersionMinor { get; set; }
|
||||||
|
|
||||||
[Output]
|
[Required]
|
||||||
public int VersionPatch { get; set; }
|
public int VersionPatch { get; set; }
|
||||||
|
|
||||||
|
[Required]
|
||||||
|
public string ReleaseSuffix { get; set; }
|
||||||
|
|
||||||
[Output]
|
[Output]
|
||||||
public string CommitCount { get; set; }
|
public string CommitCount { get; set; }
|
||||||
|
|
||||||
[Output]
|
|
||||||
public string ReleaseSuffix { get; set; }
|
|
||||||
|
|
||||||
[Output]
|
[Output]
|
||||||
public string VersionSuffix { get; set; }
|
public string VersionSuffix { get; set; }
|
||||||
|
|
||||||
|
@ -42,41 +42,27 @@ namespace Microsoft.DotNet.Cli.Build
|
||||||
[Output]
|
[Output]
|
||||||
public string VersionBadgeMoniker { get; set; }
|
public string VersionBadgeMoniker { get; set; }
|
||||||
|
|
||||||
[Output]
|
|
||||||
public string Channel { get; set; }
|
|
||||||
|
|
||||||
[Output]
|
|
||||||
public string BranchName { get; set; }
|
|
||||||
|
|
||||||
private int _commitCount;
|
private int _commitCount;
|
||||||
|
|
||||||
public override bool Execute()
|
public override bool Execute()
|
||||||
{
|
{
|
||||||
base.Execute();
|
base.Execute();
|
||||||
|
|
||||||
var branchInfo = new BranchInfo(RepoRoot);
|
|
||||||
|
|
||||||
var buildVersion = new BuildVersion()
|
var buildVersion = new BuildVersion()
|
||||||
{
|
{
|
||||||
Major = int.Parse(branchInfo.Entries["MAJOR_VERSION"]),
|
Major = VersionMajor,
|
||||||
Minor = int.Parse(branchInfo.Entries["MINOR_VERSION"]),
|
Minor = VersionMinor,
|
||||||
Patch = int.Parse(branchInfo.Entries["PATCH_VERSION"]),
|
Patch = VersionPatch,
|
||||||
ReleaseSuffix = branchInfo.Entries["RELEASE_SUFFIX"],
|
ReleaseSuffix = ReleaseSuffix,
|
||||||
CommitCount = _commitCount
|
CommitCount = _commitCount
|
||||||
};
|
};
|
||||||
|
|
||||||
VersionMajor = buildVersion.Major;
|
|
||||||
VersionMinor = buildVersion.Minor;
|
|
||||||
VersionPatch = buildVersion.Patch;
|
|
||||||
CommitCount = buildVersion.CommitCountString;
|
CommitCount = buildVersion.CommitCountString;
|
||||||
ReleaseSuffix = buildVersion.ReleaseSuffix;
|
|
||||||
VersionSuffix = buildVersion.VersionSuffix;
|
VersionSuffix = buildVersion.VersionSuffix;
|
||||||
SimpleVersion = buildVersion.SimpleVersion;
|
SimpleVersion = buildVersion.SimpleVersion;
|
||||||
NugetVersion = buildVersion.NuGetVersion;
|
NugetVersion = buildVersion.NuGetVersion;
|
||||||
MsiVersion = buildVersion.GenerateMsiVersion();
|
MsiVersion = buildVersion.GenerateMsiVersion();
|
||||||
VersionBadgeMoniker = Monikers.GetBadgeMoniker();
|
VersionBadgeMoniker = Monikers.GetBadgeMoniker();
|
||||||
Channel = branchInfo.Entries["CHANNEL"];
|
|
||||||
BranchName= branchInfo.Entries["BRANCH_NAME"];
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,45 +0,0 @@
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.IO;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Net.Http;
|
|
||||||
using System.Text;
|
|
||||||
using Microsoft.DotNet.Cli.Build.Framework;
|
|
||||||
using Microsoft.WindowsAzure.Storage;
|
|
||||||
using Microsoft.WindowsAzure.Storage.Blob;
|
|
||||||
|
|
||||||
namespace Microsoft.DotNet.Cli.Build
|
|
||||||
{
|
|
||||||
public class BranchInfo
|
|
||||||
{
|
|
||||||
private static readonly string s_branchInfoFileName = "branchinfo.txt";
|
|
||||||
|
|
||||||
private string _repoRoot;
|
|
||||||
private string _branchInfoFile;
|
|
||||||
|
|
||||||
public IDictionary<string, string> Entries { get; set; }
|
|
||||||
|
|
||||||
public BranchInfo(string repoRoot)
|
|
||||||
{
|
|
||||||
_repoRoot = repoRoot;
|
|
||||||
_branchInfoFile = Path.Combine(_repoRoot, s_branchInfoFileName);
|
|
||||||
|
|
||||||
Entries = ReadBranchInfo(_branchInfoFile);
|
|
||||||
}
|
|
||||||
|
|
||||||
private IDictionary<string, string> ReadBranchInfo(string path)
|
|
||||||
{
|
|
||||||
var lines = File.ReadAllLines(path);
|
|
||||||
var dict = new Dictionary<string, string>();
|
|
||||||
foreach (var line in lines)
|
|
||||||
{
|
|
||||||
if (!line.Trim().StartsWith("#") && !string.IsNullOrWhiteSpace(line))
|
|
||||||
{
|
|
||||||
var splat = line.Split(new[] { '=' }, 2);
|
|
||||||
dict[splat[0]] = splat[1];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return dict;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -7,7 +7,5 @@ namespace Microsoft.DotNet.Cli.Build
|
||||||
public string SimpleVersion => $"{Major}.{Minor}.{Patch}.{CommitCountString}";
|
public string SimpleVersion => $"{Major}.{Minor}.{Patch}.{CommitCountString}";
|
||||||
public string VersionSuffix => $"{ReleaseSuffix}-{CommitCountString}";
|
public string VersionSuffix => $"{ReleaseSuffix}-{CommitCountString}";
|
||||||
public string NuGetVersion => $"{Major}.{Minor}.{Patch}-{VersionSuffix}";
|
public string NuGetVersion => $"{Major}.{Minor}.{Patch}-{VersionSuffix}";
|
||||||
public string NetCoreAppVersion => $"{Major}.{Minor}.{Patch}-rc3-{CommitCountString}";
|
|
||||||
public string ProductionVersion => $"{Major}.{Minor}.{Patch}";
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,5 +12,13 @@
|
||||||
|
|
||||||
<DisableImplicitFrameworkReferences>true</DisableImplicitFrameworkReferences>
|
<DisableImplicitFrameworkReferences>true</DisableImplicitFrameworkReferences>
|
||||||
|
|
||||||
|
<VersionMajor>2</VersionMajor>
|
||||||
|
<VersionMinor>0</VersionMinor>
|
||||||
|
<VersionPatch>0</VersionPatch>
|
||||||
|
<ReleaseSuffix>alpha</ReleaseSuffix>
|
||||||
|
<Channel>master</Channel>
|
||||||
|
<BranchName>master</BranchName>
|
||||||
|
<CliVersionPrefix>$(VersionMajor).$(VersionMinor).$(VersionPatch)-$(ReleaseSuffix)</CliVersionPrefix>
|
||||||
|
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
</Project>
|
</Project>
|
||||||
|
|
|
@ -40,14 +40,6 @@ else
|
||||||
$env:DOTNET_BUILD_SKIP_PACKAGING=0
|
$env:DOTNET_BUILD_SKIP_PACKAGING=0
|
||||||
}
|
}
|
||||||
|
|
||||||
# Load Branch Info
|
|
||||||
cat "$RepoRoot\branchinfo.txt" | ForEach-Object {
|
|
||||||
if(!$_.StartsWith("#") -and ![String]::IsNullOrWhiteSpace($_)) {
|
|
||||||
$splat = $_.Split([char[]]@("="), 2)
|
|
||||||
Set-Content "env:\$($splat[0])" -Value $splat[1]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
# Use a repo-local install directory (but not the artifacts directory because that gets cleaned a lot
|
# Use a repo-local install directory (but not the artifacts directory because that gets cleaned a lot
|
||||||
if (!$env:DOTNET_INSTALL_DIR_PJ)
|
if (!$env:DOTNET_INSTALL_DIR_PJ)
|
||||||
{
|
{
|
||||||
|
|
|
@ -120,14 +120,6 @@ done
|
||||||
temp="${args[@]}"
|
temp="${args[@]}"
|
||||||
args=($temp)
|
args=($temp)
|
||||||
|
|
||||||
# Load Branch Info
|
|
||||||
while read line; do
|
|
||||||
if [[ $line != \#* ]]; then
|
|
||||||
IFS='=' read -ra splat <<< "$line"
|
|
||||||
export ${splat[0]}="${splat[1]}"
|
|
||||||
fi
|
|
||||||
done < "$REPOROOT/branchinfo.txt"
|
|
||||||
|
|
||||||
# Use a repo-local install directory (but not the artifacts directory because that gets cleaned a lot
|
# Use a repo-local install directory (but not the artifacts directory because that gets cleaned a lot
|
||||||
[ -z "$DOTNET_INSTALL_DIR_PJ" ] && export DOTNET_INSTALL_DIR_PJ=$REPOROOT/.dotnet_stage0PJ/$ARCHITECTURE
|
[ -z "$DOTNET_INSTALL_DIR_PJ" ] && export DOTNET_INSTALL_DIR_PJ=$REPOROOT/.dotnet_stage0PJ/$ARCHITECTURE
|
||||||
[ -d "$DOTNET_INSTALL_DIR_PJ" ] || mkdir -p $DOTNET_INSTALL_DIR_PJ
|
[ -d "$DOTNET_INSTALL_DIR_PJ" ] || mkdir -p $DOTNET_INSTALL_DIR_PJ
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<Description>Archive and compression types.</Description>
|
<Description>Archive and compression types.</Description>
|
||||||
<VersionPrefix>1.0.0-preview5</VersionPrefix>
|
<VersionPrefix>$(CliVersionPrefix)</VersionPrefix>
|
||||||
<TargetFramework>netstandard1.3</TargetFramework>
|
<TargetFramework>netstandard1.3</TargetFramework>
|
||||||
<AssemblyOriginatorKeyFile>../../tools/Key.snk</AssemblyOriginatorKeyFile>
|
<AssemblyOriginatorKeyFile>../../tools/Key.snk</AssemblyOriginatorKeyFile>
|
||||||
<SignAssembly>true</SignAssembly>
|
<SignAssembly>true</SignAssembly>
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<Description>SLN file reader/writer</Description>
|
<Description>SLN file reader/writer</Description>
|
||||||
<VersionPrefix>1.0.0-preview5</VersionPrefix>
|
<VersionPrefix>$(CliVersionPrefix)</VersionPrefix>
|
||||||
<TargetFramework>netstandard1.6</TargetFramework>
|
<TargetFramework>netstandard1.6</TargetFramework>
|
||||||
<DebugType>portable</DebugType>
|
<DebugType>portable</DebugType>
|
||||||
<AssemblyName>Microsoft.DotNet.Cli.Sln.Internal</AssemblyName>
|
<AssemblyName>Microsoft.DotNet.Cli.Sln.Internal</AssemblyName>
|
||||||
|
|
|
@ -21,7 +21,7 @@ namespace Microsoft.DotNet.Cli.Utils
|
||||||
public DepsJsonBuilder()
|
public DepsJsonBuilder()
|
||||||
{
|
{
|
||||||
// This resolver is only used for building file names, so that base path is not required.
|
// This resolver is only used for building file names, so that base path is not required.
|
||||||
_versionFolderPathResolver = new VersionFolderPathResolver(path: null);
|
_versionFolderPathResolver = new VersionFolderPathResolver(rootPath: null);
|
||||||
}
|
}
|
||||||
|
|
||||||
public DependencyContext Build(
|
public DependencyContext Build(
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
|
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<VersionPrefix>1.0.0-preview5</VersionPrefix>
|
<VersionPrefix>$(CliVersionPrefix)</VersionPrefix>
|
||||||
<TargetFrameworks>netstandard1.5;net46</TargetFrameworks>
|
<TargetFrameworks>netstandard1.5;net46</TargetFrameworks>
|
||||||
<WarningsAsErrors>true</WarningsAsErrors>
|
<WarningsAsErrors>true</WarningsAsErrors>
|
||||||
<AssemblyOriginatorKeyFile>../../tools/Key.snk</AssemblyOriginatorKeyFile>
|
<AssemblyOriginatorKeyFile>../../tools/Key.snk</AssemblyOriginatorKeyFile>
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
|
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<VersionPrefix>1.0.0-rc3</VersionPrefix>
|
<VersionPrefix>$(CliVersionPrefix)</VersionPrefix>
|
||||||
<TargetFramework>netstandard1.5</TargetFramework>
|
<TargetFramework>netstandard1.5</TargetFramework>
|
||||||
<WarningsAsErrors>true</WarningsAsErrors>
|
<WarningsAsErrors>true</WarningsAsErrors>
|
||||||
<AssemblyOriginatorKeyFile>../../tools/Key.snk</AssemblyOriginatorKeyFile>
|
<AssemblyOriginatorKeyFile>../../tools/Key.snk</AssemblyOriginatorKeyFile>
|
||||||
|
|
|
@ -28,7 +28,7 @@ namespace Microsoft.DotNet.Internal.ProjectModel.Resolution
|
||||||
_packagePathResolver = new FallbackPackagePathResolver(nugetPathContext);
|
_packagePathResolver = new FallbackPackagePathResolver(nugetPathContext);
|
||||||
|
|
||||||
// This resolver is only used for building file names, so that base path is not required.
|
// This resolver is only used for building file names, so that base path is not required.
|
||||||
_versionFolderPathResolver = new VersionFolderPathResolver(path: null);
|
_versionFolderPathResolver = new VersionFolderPathResolver(rootPath: null);
|
||||||
}
|
}
|
||||||
|
|
||||||
_frameworkReferenceResolver = frameworkReferenceResolver;
|
_frameworkReferenceResolver = frameworkReferenceResolver;
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
|
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<VersionPrefix>1.0.0-preview5</VersionPrefix>
|
<VersionPrefix>$(CliVersionPrefix)</VersionPrefix>
|
||||||
<TargetFramework>netcoreapp1.0</TargetFramework>
|
<TargetFramework>netcoreapp1.0</TargetFramework>
|
||||||
<WarningsAsErrors>true</WarningsAsErrors>
|
<WarningsAsErrors>true</WarningsAsErrors>
|
||||||
<AssemblyOriginatorKeyFile>../../tools/Key.snk</AssemblyOriginatorKeyFile>
|
<AssemblyOriginatorKeyFile>../../tools/Key.snk</AssemblyOriginatorKeyFile>
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<Description>Microsoft.DotNet.TestFramework Class Library</Description>
|
<Description>Microsoft.DotNet.TestFramework Class Library</Description>
|
||||||
<VersionPrefix>1.0.0-preview5</VersionPrefix>
|
<VersionPrefix>$(CliVersionPrefix)</VersionPrefix>
|
||||||
<TargetFrameworks>netstandard1.5;net46</TargetFrameworks>
|
<TargetFrameworks>netstandard1.5;net46</TargetFrameworks>
|
||||||
<AssemblyOriginatorKeyFile>../../tools/Key.snk</AssemblyOriginatorKeyFile>
|
<AssemblyOriginatorKeyFile>../../tools/Key.snk</AssemblyOriginatorKeyFile>
|
||||||
<SignAssembly>true</SignAssembly>
|
<SignAssembly>true</SignAssembly>
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
|
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<VersionPrefix>1.0.0-preview5</VersionPrefix>
|
<VersionPrefix>$(CliVersionPrefix)</VersionPrefix>
|
||||||
<TargetFramework>netcoreapp1.0</TargetFramework>
|
<TargetFramework>netcoreapp1.0</TargetFramework>
|
||||||
<AssemblyName>dotnet</AssemblyName>
|
<AssemblyName>dotnet</AssemblyName>
|
||||||
<OutputType>Exe</OutputType>
|
<OutputType>Exe</OutputType>
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
|
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<VersionPrefix>1.0.0-preview5</VersionPrefix>
|
<VersionPrefix>$(CliVersionPrefix)</VersionPrefix>
|
||||||
<TargetFramework>netcoreapp1.0</TargetFramework>
|
<TargetFramework>netcoreapp1.0</TargetFramework>
|
||||||
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
|
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
|
||||||
<PackageTargetFallback Condition=" '$(TargetFramework)' == 'netcoreapp1.0' ">$(PackageTargetFallback);dotnet5.4</PackageTargetFallback>
|
<PackageTargetFallback Condition=" '$(TargetFramework)' == 'netcoreapp1.0' ">$(PackageTargetFallback);dotnet5.4</PackageTargetFallback>
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
|
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<VersionPrefix>1.0.0-preview5</VersionPrefix>
|
<VersionPrefix>$(CliVersionPrefix)</VersionPrefix>
|
||||||
<TargetFramework>netcoreapp1.0</TargetFramework>
|
<TargetFramework>netcoreapp1.0</TargetFramework>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
|
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<VersionPrefix>1.0.0-preview5</VersionPrefix>
|
<VersionPrefix>$(CliVersionPrefix)</VersionPrefix>
|
||||||
<TargetFramework>netcoreapp1.0</TargetFramework>
|
<TargetFramework>netcoreapp1.0</TargetFramework>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.tasks" />
|
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.tasks" />
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<VersionPrefix>1.0.0-preview5</VersionPrefix>
|
<VersionPrefix>$(CliVersionPrefix)</VersionPrefix>
|
||||||
<TargetFramework>netcoreapp1.0</TargetFramework>
|
<TargetFramework>netcoreapp1.0</TargetFramework>
|
||||||
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
|
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
Loading…
Add table
Reference in a new issue