Skip to content
This repository was archived by the owner on Apr 20, 2023. It is now read-only.

Commit 43b84cf

Browse files
Livar Cunhalivarcocc
authored andcommitted
Adding roslyn to automatic dependency flow through maestro.
1 parent 9789573 commit 43b84cf

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

build_projects/update-dependencies/Config.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,15 @@ public class Config
3939

4040
private Lazy<string> _dotNetVersionUrl = new Lazy<string>(() => GetEnvironmentVariable("DOTNET_VERSION_URL", "https://raw.githubusercontent.com/dotnet/versions/master/build-info"));
4141
private Lazy<string> _coreSetupVersionFragment = new Lazy<string>(() => GetEnvironmentVariable("CORESETUP_VERSION_FRAGMENT", GetDefaultCoreSetupVersionFragment()));
42+
43+
private Lazy<string> _roslynVersionFragment = new Lazy<string>(() => GetEnvironmentVariable("ROSLYN_VERSION_FRAGMENT"));
4244
private Lazy<string> _gitHubUpstreamOwner = new Lazy<string>(() => GetEnvironmentVariable("GITHUB_UPSTREAM_OWNER", "dotnet"));
4345
private Lazy<string> _gitHubProject = new Lazy<string>(() => GetEnvironmentVariable("GITHUB_PROJECT", "cli"));
4446
private Lazy<string> _gitHubUpstreamBranch = new Lazy<string>(() => GetEnvironmentVariable("GITHUB_UPSTREAM_BRANCH", GetDefaultUpstreamBranch()));
4547
private Lazy<string[]> _gitHubPullRequestNotifications = new Lazy<string[]>(() =>
4648
GetEnvironmentVariable("GITHUB_PULL_REQUEST_NOTIFICATIONS", "")
4749
.Split(new[] { ';' }, StringSplitOptions.RemoveEmptyEntries));
50+
4851
private Config()
4952
{
5053
}
@@ -54,6 +57,8 @@ private Config()
5457
public string Password => _password.Value;
5558
public string DotNetVersionUrl => _dotNetVersionUrl.Value;
5659
public string CoreSetupVersionFragment => _coreSetupVersionFragment.Value;
60+
public string RoslynVersionFragment => _roslynVersionFragment.Value;
61+
public bool HasRoslynVersionFragment => !string.IsNullOrEmpty(RoslynVersionFragment);
5762
public string GitHubUpstreamOwner => _gitHubUpstreamOwner.Value;
5863
public string GitHubProject => _gitHubProject.Value;
5964
public string GitHubUpstreamBranch => _gitHubUpstreamBranch.Value;

build_projects/update-dependencies/Program.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,11 @@ public static void Main(string[] args)
2828

2929
buildInfos.Add(GetBuildInfo("CoreSetup", s_config.CoreSetupVersionFragment, fetchLatestReleaseFile: false));
3030

31+
if (s_config.HasRoslynVersionFragment)
32+
{
33+
buildInfos.Add(GetBuildInfo("Roslyn", s_config.RoslynVersionFragment, fetchLatestReleaseFile: false));
34+
}
35+
3136
IEnumerable<IDependencyUpdater> updaters = GetUpdaters();
3237
var dependencyBuildInfos = buildInfos.Select(buildInfo =>
3338
new BuildDependencyInfo(
@@ -88,6 +93,11 @@ private static IEnumerable<IDependencyUpdater> GetUpdaters()
8893
yield return CreateRegexUpdater(dependencyVersionsPath, "MicrosoftNETCoreAppPackageVersion", "Microsoft.NETCore.App");
8994
yield return CreateRegexUpdater(dependencyVersionsPath, "MicrosoftDotNetPlatformAbstractionsPackageVersion", "Microsoft.DotNet.PlatformAbstractions");
9095
yield return CreateRegexUpdater(dependencyVersionsPath, "MicrosoftExtensionsDependencyModelPackageVersion", "Microsoft.Extensions.DependencyModel");
96+
97+
if (s_config.HasRoslynVersionFragment)
98+
{
99+
yield return CreateRegexUpdater(dependencyVersionsPath, "MicrosoftCodeAnalysisCSharpPackageVersion", "Microsoft.CodeAnalysis.CSharp");
100+
}
91101
}
92102

93103
private static IDependencyUpdater CreateRegexUpdater(string repoRelativePath, string propertyName, string packageId)

0 commit comments

Comments
 (0)