Merge pull request #8578 from livarcocc/port_update_dependencies_change
Port update dependencies change
This commit is contained in:
commit
442881fe58
3 changed files with 23 additions and 4 deletions
|
@ -75,7 +75,7 @@
|
||||||
|
|
||||||
<!-- infrastructure and test only dependencies -->
|
<!-- infrastructure and test only dependencies -->
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<VersionToolsVersion>1.0.27-prerelease-01723-01</VersionToolsVersion>
|
<VersionToolsVersion>2.1.0-prerelease-02430-04</VersionToolsVersion>
|
||||||
<DotnetDebToolVersion>2.0.0-preview2-25331-01</DotnetDebToolVersion>
|
<DotnetDebToolVersion>2.0.0-preview2-25331-01</DotnetDebToolVersion>
|
||||||
<BuildTasksFeedToolVersion>2.1.0-prerelease-02221-02</BuildTasksFeedToolVersion>
|
<BuildTasksFeedToolVersion>2.1.0-prerelease-02221-02</BuildTasksFeedToolVersion>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
|
@ -39,12 +39,15 @@ namespace Microsoft.DotNet.Scripts
|
||||||
|
|
||||||
private Lazy<string> _dotNetVersionUrl = new Lazy<string>(() => GetEnvironmentVariable("DOTNET_VERSION_URL", "https://raw.githubusercontent.com/dotnet/versions/master/build-info"));
|
private Lazy<string> _dotNetVersionUrl = new Lazy<string>(() => GetEnvironmentVariable("DOTNET_VERSION_URL", "https://raw.githubusercontent.com/dotnet/versions/master/build-info"));
|
||||||
private Lazy<string> _coreSetupVersionFragment = new Lazy<string>(() => GetEnvironmentVariable("CORESETUP_VERSION_FRAGMENT", GetDefaultCoreSetupVersionFragment()));
|
private Lazy<string> _coreSetupVersionFragment = new Lazy<string>(() => GetEnvironmentVariable("CORESETUP_VERSION_FRAGMENT", GetDefaultCoreSetupVersionFragment()));
|
||||||
|
|
||||||
|
private Lazy<string> _roslynVersionFragment = new Lazy<string>(() => GetEnvironmentVariable("ROSLYN_VERSION_FRAGMENT"));
|
||||||
private Lazy<string> _gitHubUpstreamOwner = new Lazy<string>(() => GetEnvironmentVariable("GITHUB_UPSTREAM_OWNER", "dotnet"));
|
private Lazy<string> _gitHubUpstreamOwner = new Lazy<string>(() => GetEnvironmentVariable("GITHUB_UPSTREAM_OWNER", "dotnet"));
|
||||||
private Lazy<string> _gitHubProject = new Lazy<string>(() => GetEnvironmentVariable("GITHUB_PROJECT", "cli"));
|
private Lazy<string> _gitHubProject = new Lazy<string>(() => GetEnvironmentVariable("GITHUB_PROJECT", "cli"));
|
||||||
private Lazy<string> _gitHubUpstreamBranch = new Lazy<string>(() => GetEnvironmentVariable("GITHUB_UPSTREAM_BRANCH", GetDefaultUpstreamBranch()));
|
private Lazy<string> _gitHubUpstreamBranch = new Lazy<string>(() => GetEnvironmentVariable("GITHUB_UPSTREAM_BRANCH", GetDefaultUpstreamBranch()));
|
||||||
private Lazy<string[]> _gitHubPullRequestNotifications = new Lazy<string[]>(() =>
|
private Lazy<string[]> _gitHubPullRequestNotifications = new Lazy<string[]>(() =>
|
||||||
GetEnvironmentVariable("GITHUB_PULL_REQUEST_NOTIFICATIONS", "")
|
GetEnvironmentVariable("GITHUB_PULL_REQUEST_NOTIFICATIONS", "")
|
||||||
.Split(new[] { ';' }, StringSplitOptions.RemoveEmptyEntries));
|
.Split(new[] { ';' }, StringSplitOptions.RemoveEmptyEntries));
|
||||||
|
|
||||||
private Config()
|
private Config()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
@ -54,6 +57,8 @@ namespace Microsoft.DotNet.Scripts
|
||||||
public string Password => _password.Value;
|
public string Password => _password.Value;
|
||||||
public string DotNetVersionUrl => _dotNetVersionUrl.Value;
|
public string DotNetVersionUrl => _dotNetVersionUrl.Value;
|
||||||
public string CoreSetupVersionFragment => _coreSetupVersionFragment.Value;
|
public string CoreSetupVersionFragment => _coreSetupVersionFragment.Value;
|
||||||
|
public string RoslynVersionFragment => _roslynVersionFragment.Value;
|
||||||
|
public bool HasRoslynVersionFragment => !string.IsNullOrEmpty(RoslynVersionFragment);
|
||||||
public string GitHubUpstreamOwner => _gitHubUpstreamOwner.Value;
|
public string GitHubUpstreamOwner => _gitHubUpstreamOwner.Value;
|
||||||
public string GitHubProject => _gitHubProject.Value;
|
public string GitHubProject => _gitHubProject.Value;
|
||||||
public string GitHubUpstreamBranch => _gitHubUpstreamBranch.Value;
|
public string GitHubUpstreamBranch => _gitHubUpstreamBranch.Value;
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
using Microsoft.DotNet.VersionTools;
|
using Microsoft.DotNet.VersionTools;
|
||||||
using Microsoft.DotNet.VersionTools.Automation;
|
using Microsoft.DotNet.VersionTools.Automation;
|
||||||
using Microsoft.DotNet.VersionTools.Dependencies;
|
using Microsoft.DotNet.VersionTools.Dependencies;
|
||||||
|
using Microsoft.DotNet.VersionTools.Dependencies.BuildOutput;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
|
@ -27,9 +28,14 @@ namespace Microsoft.DotNet.Scripts
|
||||||
|
|
||||||
buildInfos.Add(GetBuildInfo("CoreSetup", s_config.CoreSetupVersionFragment, fetchLatestReleaseFile: false));
|
buildInfos.Add(GetBuildInfo("CoreSetup", s_config.CoreSetupVersionFragment, fetchLatestReleaseFile: false));
|
||||||
|
|
||||||
|
if (s_config.HasRoslynVersionFragment)
|
||||||
|
{
|
||||||
|
buildInfos.Add(GetBuildInfo("Roslyn", s_config.RoslynVersionFragment, fetchLatestReleaseFile: false));
|
||||||
|
}
|
||||||
|
|
||||||
IEnumerable<IDependencyUpdater> updaters = GetUpdaters();
|
IEnumerable<IDependencyUpdater> updaters = GetUpdaters();
|
||||||
var dependencyBuildInfos = buildInfos.Select(buildInfo =>
|
var dependencyBuildInfos = buildInfos.Select(buildInfo =>
|
||||||
new DependencyBuildInfo(
|
new BuildDependencyInfo(
|
||||||
buildInfo,
|
buildInfo,
|
||||||
upgradeStableVersions: true,
|
upgradeStableVersions: true,
|
||||||
disabledPackages: Enumerable.Empty<string>()));
|
disabledPackages: Enumerable.Empty<string>()));
|
||||||
|
@ -50,11 +56,14 @@ namespace Microsoft.DotNet.Scripts
|
||||||
body += PullRequestCreator.NotificationString(s_config.GitHubPullRequestNotifications);
|
body += PullRequestCreator.NotificationString(s_config.GitHubPullRequestNotifications);
|
||||||
}
|
}
|
||||||
|
|
||||||
new PullRequestCreator(gitHubAuth, origin, upstreamBranch)
|
new PullRequestCreator(gitHubAuth)
|
||||||
.CreateOrUpdateAsync(
|
.CreateOrUpdateAsync(
|
||||||
suggestedMessage,
|
suggestedMessage,
|
||||||
suggestedMessage + $" ({upstreamBranch.Name})",
|
suggestedMessage + $" ({upstreamBranch.Name})",
|
||||||
body)
|
body,
|
||||||
|
upstreamBranch,
|
||||||
|
origin,
|
||||||
|
new PullRequestOptions())
|
||||||
.Wait();
|
.Wait();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -84,6 +93,11 @@ namespace Microsoft.DotNet.Scripts
|
||||||
yield return CreateRegexUpdater(dependencyVersionsPath, "MicrosoftNETCoreAppPackageVersion", "Microsoft.NETCore.App");
|
yield return CreateRegexUpdater(dependencyVersionsPath, "MicrosoftNETCoreAppPackageVersion", "Microsoft.NETCore.App");
|
||||||
yield return CreateRegexUpdater(dependencyVersionsPath, "MicrosoftDotNetPlatformAbstractionsPackageVersion", "Microsoft.DotNet.PlatformAbstractions");
|
yield return CreateRegexUpdater(dependencyVersionsPath, "MicrosoftDotNetPlatformAbstractionsPackageVersion", "Microsoft.DotNet.PlatformAbstractions");
|
||||||
yield return CreateRegexUpdater(dependencyVersionsPath, "MicrosoftExtensionsDependencyModelPackageVersion", "Microsoft.Extensions.DependencyModel");
|
yield return CreateRegexUpdater(dependencyVersionsPath, "MicrosoftExtensionsDependencyModelPackageVersion", "Microsoft.Extensions.DependencyModel");
|
||||||
|
|
||||||
|
if (s_config.HasRoslynVersionFragment)
|
||||||
|
{
|
||||||
|
yield return CreateRegexUpdater(dependencyVersionsPath, "MicrosoftCodeAnalysisCSharpPackageVersion", "Microsoft.CodeAnalysis.CSharp");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private static IDependencyUpdater CreateRegexUpdater(string repoRelativePath, string propertyName, string packageId)
|
private static IDependencyUpdater CreateRegexUpdater(string repoRelativePath, string propertyName, string packageId)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue