Skip to content

Commit

Permalink
tools: Allow dependency updates of prereleases to target new prereleases
Browse files Browse the repository at this point in the history
  • Loading branch information
jskeet committed Mar 27, 2024
1 parent 76d37d8 commit 7d3195f
Showing 1 changed file with 2 additions and 1 deletion.
Expand Up @@ -314,6 +314,7 @@ public static void RewriteRenovate(ApiCatalog catalog)
/// </summary>
public static void UpdateDependencies(ApiCatalog catalog, ApiMetadata api)
{
bool stableOnly = api.StructuredVersion.IsStable;
UpdateDependencyDictionary(api.Dependencies, "dependencies");
UpdateDependencyDictionary(api.TestDependencies, "testDependencies");

Expand Down Expand Up @@ -347,7 +348,7 @@ void UpdateDependencyDictionary(SortedDictionary<string, string> dependencies, s
var structuredCurrentVersion = StructuredVersion.FromString(currentVersion);
if (structuredDefaultVersion.CompareTo(structuredCurrentVersion) > 0 &&
structuredDefaultVersion.Major == structuredCurrentVersion.Major &&
structuredDefaultVersion.IsStable)
(structuredDefaultVersion.IsStable || !stableOnly))
{
dependencies[package] = defaultVersion;
}
Expand Down

0 comments on commit 7d3195f

Please sign in to comment.