From abc155e273a61bf52bf02b7c7da066d3e17c1790 Mon Sep 17 00:00:00 2001 From: Bryan Date: Thu, 5 May 2016 10:51:58 -0700 Subject: [PATCH] make versions consistent for PackCommand, add back * to test packages, remove --version-suffix from publish --- .../TestPackages/dotnet-dependency-context-test/project.json | 2 +- .../TestPackages/dotnet-dependency-tool-invoker/project.json | 2 +- .../TestPackages/dotnet-desktop-and-portable/project.json | 2 +- .../dotnet-desktop-binding-redirects/project.json | 2 +- scripts/dotnet-cli-build/CompileTargets.cs | 4 +--- scripts/dotnet-cli-build/TestTargets.cs | 2 +- scripts/dotnet-cli-build/Utils/BuildVersion.cs | 2 +- 7 files changed, 7 insertions(+), 9 deletions(-) diff --git a/TestAssets/TestPackages/dotnet-dependency-context-test/project.json b/TestAssets/TestPackages/dotnet-dependency-context-test/project.json index c7f52b0a9..d7953ebc1 100644 --- a/TestAssets/TestPackages/dotnet-dependency-context-test/project.json +++ b/TestAssets/TestPackages/dotnet-dependency-context-test/project.json @@ -1,5 +1,5 @@ { - "version": "1.0.0", + "version": "1.0.0-preview1-*", "compilationOptions": { "emitEntryPoint": true }, diff --git a/TestAssets/TestPackages/dotnet-dependency-tool-invoker/project.json b/TestAssets/TestPackages/dotnet-dependency-tool-invoker/project.json index 47f4722c5..fb90a2260 100644 --- a/TestAssets/TestPackages/dotnet-dependency-tool-invoker/project.json +++ b/TestAssets/TestPackages/dotnet-dependency-tool-invoker/project.json @@ -1,5 +1,5 @@ { - "version": "1.0.0", + "version": "1.0.0-preview1-*", "compilationOptions": { "emitEntryPoint": true }, diff --git a/TestAssets/TestPackages/dotnet-desktop-and-portable/project.json b/TestAssets/TestPackages/dotnet-desktop-and-portable/project.json index 457f1a3f3..2d9e5da19 100644 --- a/TestAssets/TestPackages/dotnet-desktop-and-portable/project.json +++ b/TestAssets/TestPackages/dotnet-desktop-and-portable/project.json @@ -1,5 +1,5 @@ { - "version": "1.0.0", + "version": "1.0.0-preview1-*", "compilationOptions": { "emitEntryPoint": true }, diff --git a/TestAssets/TestPackages/dotnet-desktop-binding-redirects/project.json b/TestAssets/TestPackages/dotnet-desktop-binding-redirects/project.json index b136fbc65..f04b04c6e 100644 --- a/TestAssets/TestPackages/dotnet-desktop-binding-redirects/project.json +++ b/TestAssets/TestPackages/dotnet-desktop-binding-redirects/project.json @@ -1,5 +1,5 @@ { - "version": "1.0.0", + "version": "1.0.0-preview1-*", "compilationOptions": { "emitEntryPoint": true }, diff --git a/scripts/dotnet-cli-build/CompileTargets.cs b/scripts/dotnet-cli-build/CompileTargets.cs index d53dd2839..49c6c9463 100644 --- a/scripts/dotnet-cli-build/CompileTargets.cs +++ b/scripts/dotnet-cli-build/CompileTargets.cs @@ -625,9 +625,7 @@ namespace Microsoft.DotNet.Cli.Build outputDir, "--configuration", configuration, - Path.Combine(c.BuildContext.BuildDirectory, "src", project), - "--version-suffix", - buildVersion.VersionSuffix) + Path.Combine(c.BuildContext.BuildDirectory, "src", project)) .Environment("DOTNET_BUILD_VERSION", buildVersion.VersionSuffix) .Execute() .EnsureSuccessful(); diff --git a/scripts/dotnet-cli-build/TestTargets.cs b/scripts/dotnet-cli-build/TestTargets.cs index b3a1b3a18..646470c82 100644 --- a/scripts/dotnet-cli-build/TestTargets.cs +++ b/scripts/dotnet-cli-build/TestTargets.cs @@ -162,7 +162,7 @@ namespace Microsoft.DotNet.Cli.Build var versionSuffix = testPackageProject.VersionSuffix; if (versionSuffix.Equals(s_testPackageBuildVersionSuffix)) { - versionSuffix = c.BuildContext.Get("BuildVersion").VersionSuffix; + versionSuffix = c.BuildContext.Get("BuildVersion").CommitCountString; } var fullPath = Path.Combine(c.BuildContext.BuildDirectory, relativePath.Replace('/', Path.DirectorySeparatorChar)); diff --git a/scripts/dotnet-cli-build/Utils/BuildVersion.cs b/scripts/dotnet-cli-build/Utils/BuildVersion.cs index 593c7b362..df6ac2426 100644 --- a/scripts/dotnet-cli-build/Utils/BuildVersion.cs +++ b/scripts/dotnet-cli-build/Utils/BuildVersion.cs @@ -5,7 +5,7 @@ namespace Microsoft.DotNet.Cli.Build public class BuildVersion : Version { public string SimpleVersion => $"{Major}.{Minor}.{Patch}.{CommitCountString}"; - public string VersionSuffix => $"{CommitCountString}"; + public string VersionSuffix => $"{ReleaseSuffix}-{CommitCountString}"; public string NuGetVersion => $"{Major}.{Minor}.{Patch}-{VersionSuffix}"; public string NetCoreAppVersion => $"{Major}.{Minor}.{Patch}-rc2-3{CommitCountString}"; public string ProductionVersion => $"{Major}.{Minor}.{Patch}";