Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update OM to allow for old properties #10

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/DotnetRelease/MajorReleaseOverviewRecords.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

namespace DotnetRelease;

[JsonUnmappedMemberHandling(JsonUnmappedMemberHandling.Disallow)]
// [JsonUnmappedMemberHandling(JsonUnmappedMemberHandling.Disallow)]
[Description("A major product release, including detailed information for each patch release.")]
public record MajorReleaseOverview(
[property: Description("Major (or major.minor) version of the product.")]
Expand Down
2 changes: 1 addition & 1 deletion src/DotnetRelease/OSPackagesRecords.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ namespace DotnetRelease;
// For os-packages.json file
// List of packages required by product
// Example: https://github.com/dotnet/core/blob/main/release-notes/9.0/supported-os.json
[JsonUnmappedMemberHandling(JsonUnmappedMemberHandling.Disallow)]
[JsonUnmappedMemberHandling(JsonUnmappedMemberHandling.Skip)]
[Description("The set of packages required by a given product version for a set of distros.")]
public record OSPackagesOverview(
[property: Description("Major (or major.minor) version of product.")]
Expand Down
6 changes: 3 additions & 3 deletions src/DotnetRelease/PatchReleaseOverviewRecords.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public record PatchReleaseOverview(
[property: Description("A patch release with detailed release information.")]
PatchRelease Release);

[JsonUnmappedMemberHandling(JsonUnmappedMemberHandling.Disallow)]
// [JsonUnmappedMemberHandling(JsonUnmappedMemberHandling.Disallow)]
[Description("Detailed information for the patch release.")]
public record PatchRelease(
[property: Description("The date of the patch release.")]
Expand Down Expand Up @@ -65,7 +65,7 @@ public record Cve(
[property: Description("The URL tracking the CVE at the authoritative site.")]
string CveUrl);

[JsonUnmappedMemberHandling(JsonUnmappedMemberHandling.Disallow)]
// [JsonUnmappedMemberHandling(JsonUnmappedMemberHandling.Disallow)]
[Description("Runtime component of a release.")]
public record RuntimeComponent(
[property: Description("The version of the component.")]
Expand All @@ -85,7 +85,7 @@ public record RuntimeComponent(
JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
string? VSSupport = null);

[JsonUnmappedMemberHandling(JsonUnmappedMemberHandling.Disallow)]
// [JsonUnmappedMemberHandling(JsonUnmappedMemberHandling.Disallow)]
[Description("SDK component of the release.")]
public record SdkComponent(
[property: Description("The version of the component.")]
Expand Down
2 changes: 1 addition & 1 deletion src/GenerateJsonSchemas/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
new (typeof(PatchReleasesIndex), "dotnet-patch-releases-index.json"),
new (typeof(PatchReleaseOverview), "dotnet-patch-release.json"),
new (typeof(OSPackagesOverview), "dotnet-os-packages.json"),
new (typeof(SupportedOSMatrix), "dotnet-supported-os-matrix.json"),
new (typeof(SupportedOSMatrix), "dotnet-supported-os.json"),
// new (typeof(ReportOverview), "dotnet-support-report.json"),
];

Expand Down
10 changes: 3 additions & 7 deletions src/LinuxPackagesMd/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,10 @@
using DotnetRelease;
using MarkdownHelpers;

// if (args.Length is 0 || !int.TryParse(args[0], out int ver))
// {
// ReportInvalidArgs();
// return;
// }

int ver = 9;

string version = $"{ver}.0";
string baseDefaultURL = "https://raw.githubusercontent.com/dotnet/core/linux-packages/release-notes/";
string baseDefaultURL = "https://raw.githubusercontent.com/dotnet/core/main/release-notes";
string baseUrl = args.Length > 1 ? args[1] : baseDefaultURL;
bool preferWeb = baseUrl.StartsWith("https");
string packageJson = baseUrl;
Expand All @@ -29,6 +23,8 @@
StreamWriter writer = new(stream);
OSPackagesOverview? packageOverview = null;

Console.WriteLine($"Querying {packageJson}");

if (preferWeb)
{
packageOverview = await ReleaseNotes.GetOSPackages(client, packageJson) ?? throw new();
Expand Down