Adding roslyn to automatic dependency flow through maestro.

This commit is contained in:
Livar Cunha 2018-01-30 15:43:41 -08:00 committed by Livar Cunha
parent 978957315b
commit 43b84cf1e2
2 changed files with 15 additions and 0 deletions

View file

@ -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> _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> _gitHubProject = new Lazy<string>(() => GetEnvironmentVariable("GITHUB_PROJECT", "cli"));
private Lazy<string> _gitHubUpstreamBranch = new Lazy<string>(() => GetEnvironmentVariable("GITHUB_UPSTREAM_BRANCH", GetDefaultUpstreamBranch()));
private Lazy<string[]> _gitHubPullRequestNotifications = new Lazy<string[]>(() =>
GetEnvironmentVariable("GITHUB_PULL_REQUEST_NOTIFICATIONS", "")
.Split(new[] { ';' }, StringSplitOptions.RemoveEmptyEntries));
private Config()
{
}
@ -54,6 +57,8 @@ namespace Microsoft.DotNet.Scripts
public string Password => _password.Value;
public string DotNetVersionUrl => _dotNetVersionUrl.Value;
public string CoreSetupVersionFragment => _coreSetupVersionFragment.Value;
public string RoslynVersionFragment => _roslynVersionFragment.Value;
public bool HasRoslynVersionFragment => !string.IsNullOrEmpty(RoslynVersionFragment);
public string GitHubUpstreamOwner => _gitHubUpstreamOwner.Value;
public string GitHubProject => _gitHubProject.Value;
public string GitHubUpstreamBranch => _gitHubUpstreamBranch.Value;

View file

@ -28,6 +28,11 @@ namespace Microsoft.DotNet.Scripts
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();
var dependencyBuildInfos = buildInfos.Select(buildInfo =>
new BuildDependencyInfo(
@ -88,6 +93,11 @@ namespace Microsoft.DotNet.Scripts
yield return CreateRegexUpdater(dependencyVersionsPath, "MicrosoftNETCoreAppPackageVersion", "Microsoft.NETCore.App");
yield return CreateRegexUpdater(dependencyVersionsPath, "MicrosoftDotNetPlatformAbstractionsPackageVersion", "Microsoft.DotNet.PlatformAbstractions");
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)