diff --git a/Microsoft.DotNet.Cli.sln b/Microsoft.DotNet.Cli.sln index b7f28f54a..5e30fb2af 100644 --- a/Microsoft.DotNet.Cli.sln +++ b/Microsoft.DotNet.Cli.sln @@ -29,13 +29,13 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "build", "build", "{89905EC4 build\BuildDefaults.props = build\BuildDefaults.props build\BuildOutputs.props = build\BuildOutputs.props build\BundledSdks.proj = build\BundledSdks.proj - build\Microsoft.DotNet.Cli.BundledRuntimes.props = build\Microsoft.DotNet.Cli.BundledRuntimes.props + build\BundledRuntimes.props = build\BundledRuntimes.props build\BundledSdks.props = build\BundledSdks.props build\BundledTemplates.proj = build\BundledTemplates.proj build\BundledTemplates.props = build\BundledTemplates.props build\Compile.targets = build\Compile.targets build\CoreSetupInfo.props = build\CoreSetupInfo.props - build\Microsoft.DotNet.Cli.DependencyVersions.props = build\Microsoft.DotNet.Cli.DependencyVersions.props + build\DependencyVersions.props = build\DependencyVersions.props build\FileExtensions.props = build\FileExtensions.props build\GitCommitInfo.targets = build\GitCommitInfo.targets build\HostInfo.targets = build\HostInfo.targets diff --git a/README.md b/README.md index 0fbe7ded6..d1223ed6b 100644 --- a/README.md +++ b/README.md @@ -37,35 +37,35 @@ Build Status |:------:|:------:|:------:|:------:|:------:|:------:|:------:|:------:|:------:|:------:| |[![][ubuntu-14.04-build-badge]][ubuntu-14.04-build]|[![][ubuntu-16.04-build-badge]][ubuntu-16.04-build]|[![][debian-8.2-build-badge]][debian-8.2-build]|[![][win-x64-build-badge]][win-x64-build]|[![][win-x86-build-badge]][win-x86-build]|[![][osx-build-badge]][osx-build]|[![][centos-build-badge]][centos-build]|[![][rhel-build-badge]][rhel-build]|[![][opensuse-13.2-build-badge]][opensuse-13.2-build]|[![][fedora-23-build-badge]][fedora-23-build]| -[win-x64-build-badge]: https://mseng.visualstudio.com/_apis/public/build/definitions/d09b7a4d-0a51-4c0e-a15a-07921d5b558f/4638/badge -[win-x64-build]: https://mseng.visualstudio.com/dotnetcore/_build?_a=completed&definitionId=4638 +[win-x64-build-badge]: https://devdiv.visualstudio.com/_apis/public/build/definitions/0bdbc590-a062-4c3f-b0f6-9383f67865ee/5449/badge +[win-x64-build]: https://devdiv.visualstudio.com/DevDiv/_build?_a=completed&definitionId=5449 -[win-x86-build-badge]: https://mseng.visualstudio.com/_apis/public/build/definitions/d09b7a4d-0a51-4c0e-a15a-07921d5b558f/4637/badge -[win-x86-build]: https://mseng.visualstudio.com/dotnetcore/_build?_a=completed&definitionId=4637 +[win-x86-build-badge]: https://devdiv.visualstudio.com/_apis/public/build/definitions/0bdbc590-a062-4c3f-b0f6-9383f67865ee/5450/badge +[win-x86-build]: https://devdiv.visualstudio.com/DevDiv/_build?_a=completed&definitionId=5450 -[ubuntu-14.04-build-badge]: https://mseng.visualstudio.com/_apis/public/build/definitions/d09b7a4d-0a51-4c0e-a15a-07921d5b558f/4633/badge -[ubuntu-14.04-build]: https://mseng.visualstudio.com/dotnetcore/_build?_a=completed&definitionId=4633 +[ubuntu-14.04-build-badge]: https://devdiv.visualstudio.com/_apis/public/build/definitions/0bdbc590-a062-4c3f-b0f6-9383f67865ee/5447/badge +[ubuntu-14.04-build]: https://devdiv.visualstudio.com/DevDiv/_build?_a=completed&definitionId=5447 -[ubuntu-16.04-build-badge]: https://mseng.visualstudio.com/_apis/public/build/definitions/d09b7a4d-0a51-4c0e-a15a-07921d5b558f/4635/badge -[ubuntu-16.04-build]: https://mseng.visualstudio.com/dotnetcore/_build?_a=completed&definitionId=4635 +[ubuntu-16.04-build-badge]: https://devdiv.visualstudio.com/_apis/public/build/definitions/0bdbc590-a062-4c3f-b0f6-9383f67865ee/5448/badge +[ubuntu-16.04-build]: https://devdiv.visualstudio.com/DevDiv/_build?_a=completed&definitionId=5448 -[debian-8.2-build-badge]: https://mseng.visualstudio.com/_apis/public/build/definitions/d09b7a4d-0a51-4c0e-a15a-07921d5b558f/4629/badge -[debian-8.2-build]: https://mseng.visualstudio.com/dotnetcore/_build?_a=completed&definitionId=4629 +[debian-8.2-build-badge]: https://devdiv.visualstudio.com/_apis/public/build/definitions/0bdbc590-a062-4c3f-b0f6-9383f67865ee/5442/badge +[debian-8.2-build]: https://devdiv.visualstudio.com/DevDiv/_build?_a=completed&definitionId=5442 -[osx-build-badge]: https://mseng.visualstudio.com/_apis/public/build/definitions/d09b7a4d-0a51-4c0e-a15a-07921d5b558f/4632/badge -[osx-build]: https://mseng.visualstudio.com/dotnetcore/_build?_a=completed&definitionId=4632 +[osx-build-badge]: https://devdiv.visualstudio.com/_apis/public/build/definitions/0bdbc590-a062-4c3f-b0f6-9383f67865ee/5445/badge +[osx-build]: https://devdiv.visualstudio.com/DevDiv/_build?_a=completed&definitionId=5445 -[centos-build-badge]: https://mseng.visualstudio.com/_apis/public/build/definitions/d09b7a4d-0a51-4c0e-a15a-07921d5b558f/4628/badge -[centos-build]: https://mseng.visualstudio.com/dotnetcore/_build?_a=completed&definitionId=4628 +[centos-build-badge]: https://devdiv.visualstudio.com/_apis/public/build/definitions/0bdbc590-a062-4c3f-b0f6-9383f67865ee/5441/badge +[centos-build]: https://devdiv.visualstudio.com/DevDiv/_build?_a=completed&definitionId=5441 -[rhel-build-badge]: https://mseng.visualstudio.com/_apis/public/build/definitions/d09b7a4d-0a51-4c0e-a15a-07921d5b558f/4634/badge -[rhel-build]: https://mseng.visualstudio.com/dotnetcore/_build?_a=completed&definitionId=4634 +[rhel-build-badge]: https://devdiv.visualstudio.com/_apis/public/build/definitions/0bdbc590-a062-4c3f-b0f6-9383f67865ee/5446/badge +[rhel-build]: https://devdiv.visualstudio.com/DevDiv/_build?_a=completed&definitionId=5446 -[opensuse-13.2-build-badge]: https://mseng.visualstudio.com/_apis/public/build/definitions/d09b7a4d-0a51-4c0e-a15a-07921d5b558f/4631/badge -[opensuse-13.2-build]: https://mseng.visualstudio.com/dotnetcore/_build?_a=completed&definitionId=4631 +[opensuse-13.2-build-badge]: https://devdiv.visualstudio.com/_apis/public/build/definitions/0bdbc590-a062-4c3f-b0f6-9383f67865ee/5444/badge +[opensuse-13.2-build]: https://devdiv.visualstudio.com/DevDiv/_build?_a=completed&definitionId=5444 -[fedora-23-build-badge]: https://mseng.visualstudio.com/_apis/public/build/definitions/d09b7a4d-0a51-4c0e-a15a-07921d5b558f/4630/badge -[fedora-23-build]: https://mseng.visualstudio.com/dotnetcore/_build?_a=completed&definitionId=4630 +[fedora-23-build-badge]: https://devdiv.visualstudio.com/_apis/public/build/definitions/0bdbc590-a062-4c3f-b0f6-9383f67865ee/5443/badge +[fedora-23-build]: https://devdiv.visualstudio.com/DevDiv/_build?_a=completed&definitionId=5443 Installers and Binaries ----------------------- diff --git a/build/Microsoft.DotNet.Cli.BundledRuntimes.props b/build/BundledRuntimes.props similarity index 100% rename from build/Microsoft.DotNet.Cli.BundledRuntimes.props rename to build/BundledRuntimes.props diff --git a/build/Compile.targets b/build/Compile.targets index d82af9a49..c694132bf 100644 --- a/build/Compile.targets +++ b/build/Compile.targets @@ -50,11 +50,8 @@ + ProjectPath="$(SrcDirectory)/redist/redist.csproj" /> $(Stage1Directory)/dotnet$(ExeExtension) $(BaseOutputDirectory)/stage2 $(BaseOutputDirectory)/stage2symbols + $(Stage2Directory)/sdk/$(SdkVersion) $(Stage2Directory)/dotnet$(ExeExtension) $(Stage2Directory)/ $(BaseOutputDirectory)/stage2compilation $(Stage2Directory) $(Stage2SymbolsDirectory) - $(StageDirectory)/sdk/$(SdkVersion) + $(Stage2SdkDirectory) $(SdkOutputDirectory)/runtimes/any/native $(BaseOutputDirectory)/intermediate $(BaseOutputDirectory)/packages diff --git a/build_projects/update-dependencies/Config.cs b/build_projects/update-dependencies/Config.cs index 7f020bfeb..e9c08ac10 100644 --- a/build_projects/update-dependencies/Config.cs +++ b/build_projects/update-dependencies/Config.cs @@ -10,19 +10,20 @@ namespace Microsoft.DotNet.Scripts /// /// /// The following Environment Variables are required by this script: - /// + /// /// GITHUB_USER - The user to commit the changes as. /// GITHUB_EMAIL - The user's email to commit the changes as. /// GITHUB_PASSWORD - The password/personal access token of the GitHub user. /// /// The following Environment Variables can optionally be specified: - /// - /// ROSLYN_VERSION_URL - The Url to get the current Roslyn version. (ex. "https://raw.githubusercontent.com/dotnet/versions/master/build-info/dotnet/roslyn/netcore1.0") - /// CORESETUP_VERSION_URL - The Url to get the current dotnet/core-setup package versions. (ex. "https://raw.githubusercontent.com/dotnet/versions/master/build-info/dotnet/core-setup/master") + /// + /// DOTNET_VERSION_URL - The Url to the root of the version information (this is combined with the fragments bellow) (ex. "https://raw.githubusercontent.com/dotnet/versions/master/build-info") + /// ROSLYN_VERSION_FRAGMENT - The fragment to combine with DOTNET_VERSION_URL to get the current dotnet/roslyn package versions. (ex. "dotnet/roslyn/netcore1.0") + /// CORESETUP_VERSION_FRAGMENT - The fragment to combine with DOTNET_VERSION_URL to get the current dotnet/core-setup package versions. (ex. "dotnet/core-setup/master") /// GITHUB_ORIGIN_OWNER - The owner of the GitHub fork to push the commit and create the PR from. (ex. "dotnet-bot") /// GITHUB_UPSTREAM_OWNER - The owner of the GitHub base repo to create the PR to. (ex. "dotnet") /// GITHUB_PROJECT - The repo name under the ORIGIN and UPSTREAM owners. (ex. "cli") - /// GITHUB_UPSTREAM_BRANCH - The branch in the GitHub base repo to create the PR to. (ex. "master") + /// GITHUB_UPSTREAM_BRANCH - The branch in the GitHub base repo to create the PR to. (ex. "master"); /// GITHUB_PULL_REQUEST_NOTIFICATIONS - A semi-colon ';' separated list of GitHub users to notify on the PR. /// public class Config @@ -32,25 +33,26 @@ namespace Microsoft.DotNet.Scripts private Lazy _userName = new Lazy(() => GetEnvironmentVariable("GITHUB_USER")); private Lazy _email = new Lazy(() => GetEnvironmentVariable("GITHUB_EMAIL")); private Lazy _password = new Lazy(() => GetEnvironmentVariable("GITHUB_PASSWORD")); - - private Lazy _roslynVersionUrl = new Lazy(() => GetEnvironmentVariable("ROSLYN_VERSION_URL", "https://raw.githubusercontent.com/dotnet/versions/master/build-info/dotnet/roslyn/netcore1.0")); - private Lazy _coreSetupVersionUrl = new Lazy(() => GetEnvironmentVariable("CORESETUP_VERSION_URL", "https://raw.githubusercontent.com/dotnet/versions/master/build-info/dotnet/core-setup/master")); + + private Lazy _dotNetVersionUrl = new Lazy(() => GetEnvironmentVariable("DOTNET_VERSION_URL", "https://raw.githubusercontent.com/dotnet/versions/master/build-info")); + private Lazy _roslynVersionFragment = new Lazy(() => GetEnvironmentVariable("ROSLYN_VERSION_FRAGMENT", "dotnet/roslyn/netcore1.0")); + private Lazy _coreSetupVersionFragment = new Lazy(() => GetEnvironmentVariable("CORESETUP_VERSION_FRAGMENT", "dotnet/core-setup/master")); private Lazy _gitHubUpstreamOwner = new Lazy(() => GetEnvironmentVariable("GITHUB_UPSTREAM_OWNER", "dotnet")); private Lazy _gitHubProject = new Lazy(() => GetEnvironmentVariable("GITHUB_PROJECT", "cli")); private Lazy _gitHubUpstreamBranch = new Lazy(() => GetEnvironmentVariable("GITHUB_UPSTREAM_BRANCH", "master")); - private Lazy _gitHubPullRequestNotifications = new Lazy(() => + private Lazy _gitHubPullRequestNotifications = new Lazy(() => GetEnvironmentVariable("GITHUB_PULL_REQUEST_NOTIFICATIONS", "") .Split(new[] { ';' }, StringSplitOptions.RemoveEmptyEntries)); - private Config() { } public string UserName => _userName.Value; - public string Email => _email.Value; + public string Email => _email.Value; public string Password => _password.Value; - public string RoslynVersionUrl => _roslynVersionUrl.Value; - public string CoreSetupVersionUrl => _coreSetupVersionUrl.Value; + public string DotNetVersionUrl => _dotNetVersionUrl.Value; + public string RoslynVersionFragment => _roslynVersionFragment.Value; + public string CoreSetupVersionFragment => _coreSetupVersionFragment.Value; public string GitHubUpstreamOwner => _gitHubUpstreamOwner.Value; public string GitHubProject => _gitHubProject.Value; public string GitHubUpstreamBranch => _gitHubUpstreamBranch.Value; diff --git a/build_projects/update-dependencies/Program.cs b/build_projects/update-dependencies/Program.cs index 7b043258d..991d86af0 100644 --- a/build_projects/update-dependencies/Program.cs +++ b/build_projects/update-dependencies/Program.cs @@ -25,8 +25,8 @@ namespace Microsoft.DotNet.Scripts List buildInfos = new List(); - buildInfos.Add(BuildInfo.Get("Roslyn", s_config.RoslynVersionUrl, fetchLatestReleaseFile: false)); - buildInfos.Add(BuildInfo.Get("CoreSetup", s_config.CoreSetupVersionUrl, fetchLatestReleaseFile: false)); + buildInfos.Add(GetBuildInfo("Roslyn", s_config.RoslynVersionFragment, fetchLatestReleaseFile: false)); + buildInfos.Add(GetBuildInfo("CoreSetup", s_config.CoreSetupVersionFragment, fetchLatestReleaseFile: false)); IEnumerable updaters = GetUpdaters(); var dependencyBuildInfos = buildInfos.Select(buildInfo => @@ -60,9 +60,28 @@ namespace Microsoft.DotNet.Scripts } } + private static BuildInfo GetBuildInfo(string name, string buildInfoFragment, bool fetchLatestReleaseFile = true) + { + const string FileUrlProtocol = "file://"; + + if (s_config.DotNetVersionUrl.StartsWith(FileUrlProtocol, StringComparison.Ordinal)) + { + return BuildInfo.LocalFileGetAsync( + name, + s_config.DotNetVersionUrl.Substring(FileUrlProtocol.Length), + buildInfoFragment.Replace('/', Path.DirectorySeparatorChar), + fetchLatestReleaseFile) + .Result; + } + else + { + return BuildInfo.Get(name, $"{s_config.DotNetVersionUrl}/{buildInfoFragment}", fetchLatestReleaseFile); + } + } + private static IEnumerable GetUpdaters() { - yield return CreateRegexUpdater(Path.Combine("build", "Microsoft.DotNet.Cli.DependencyVersions.props"), "CLI_SharedFrameworkVersion", "Microsoft.NETCore.App"); + yield return CreateRegexUpdater(Path.Combine("build", "DependencyVersions.props"), "CLI_SharedFrameworkVersion", "Microsoft.NETCore.App"); } private static IDependencyUpdater CreateRegexUpdater(string repoRelativePath, string propertyName, string packageId) diff --git a/build_projects/update-dependencies/update-dependencies.csproj b/build_projects/update-dependencies/update-dependencies.csproj index daa3308a1..cd67c50dc 100644 --- a/build_projects/update-dependencies/update-dependencies.csproj +++ b/build_projects/update-dependencies/update-dependencies.csproj @@ -13,7 +13,7 @@ - + diff --git a/dir.props b/dir.props index c7b1bab48..9a4b31211 100644 --- a/dir.props +++ b/dir.props @@ -11,7 +11,7 @@ - + @@ -22,7 +22,7 @@ - + $(NUGET_PACKAGES) diff --git a/src/Microsoft.DotNet.Cli.Utils/Microsoft.DotNet.Cli.Utils.csproj b/src/Microsoft.DotNet.Cli.Utils/Microsoft.DotNet.Cli.Utils.csproj index 95539171e..4f73b4c01 100644 --- a/src/Microsoft.DotNet.Cli.Utils/Microsoft.DotNet.Cli.Utils.csproj +++ b/src/Microsoft.DotNet.Cli.Utils/Microsoft.DotNet.Cli.Utils.csproj @@ -2,7 +2,7 @@ - $(CliVersionPrefix) + $(SdkVersion) netstandard1.5;net46 true ../../tools/Key.snk @@ -11,42 +11,21 @@ - - 1.0.1-beta-000933 - - - $(PlatformAbstractionsVersion) - - - $(CLI_NuGet_Version) - - - $(CLI_NuGet_Version) - - - $(CLI_NuGet_Version) - - - $(CLI_NuGet_Version) - - - $(CLI_MSBuild_Version) - - - $(CLI_MSBuild_Version) - + + + + + + + + - - 4.1.0 - + - - $(DefineConstants);RELEASE - \ No newline at end of file diff --git a/src/dotnet/dotnet.csproj b/src/dotnet/dotnet.csproj index 243d7b027..92b1899fb 100644 --- a/src/dotnet/dotnet.csproj +++ b/src/dotnet/dotnet.csproj @@ -2,7 +2,7 @@ - $(CliVersionPrefix) + $(SdkVersion) netcoreapp2.0 dotnet Exe diff --git a/src/redist/redist.csproj b/src/redist/redist.csproj index 613c107d5..4cb38d156 100644 --- a/src/redist/redist.csproj +++ b/src/redist/redist.csproj @@ -1,4 +1,4 @@ - + @@ -7,23 +7,16 @@ $(CLI_SharedFrameworkVersion) true $(PackageTargetFallback);dotnet5.4 + $(Stage2SdkDirectory) + $(CommitCount) + - - $(CLI_SharedFrameworkVersion) - - - $(CLI_MSBuild_Version) - - - $(CLI_NuGet_Version) - - - $(CLI_TestPlatform_Version) - - - $(CLI_TestPlatform_Version) - + + + + +