Skip to content

Commit

Permalink
Configure Renovate to update .NET framework-specific packages in a .N…
Browse files Browse the repository at this point in the history
…ET framework-aware way (Lombiq Technologies: OCORE-218) (#17249)
  • Loading branch information
Piedone authored Dec 18, 2024
1 parent 94a03aa commit a3b6f9e
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,18 @@ Use the minimal SDK version required, the `rollForward` rule will pick the lates
- [ ] Update docker file base images.
- [ ] Update documentation pages specifying a TFM (search for `<TargetFramework>`).
- [ ] Add a note about the supported .NET versions to the upcoming release notes.
- [ ] When dual-targeting framework versions, configure Renovate in the `renovate.json5` file (in the repository root) to update packages targeting the older framework only up to their compatible versions. An example package rule for the `packageRules` section that will update the <9.0.0 (i.e. 8.x) version of the matching packages only up to 8.x:
```json5
{
// The .NET 8 versions of these packages need to stay on 8.x. We maintain a separate reference to the
// .NET 9 versions in Directory.Packages.props, which is only active when building for .NET 9.
matchPackageNames: [
'/^Microsoft\\.AspNetCore.*$/',
'/^Microsoft\\.Extensions.*$/',
'Serilog.AspNetCore',
'System.Text.Json',
],
allowedVersions: '<9.0.0',
matchCurrentVersion: '<9.0.0',
}
```
17 changes: 15 additions & 2 deletions renovate.json5
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,22 @@
// See https://docs.renovatebot.com/configuration-options/#configmigration.
configMigration: true,
packageRules: [
// Disable certain updates.
{
// The .NET 8 versions of these packages need to stay on 8.x. We maintain a separate reference to the
// .NET 9 versions in Directory.Packages.props, only active when building for .NET 9.
matchPackageNames: [
'/^Microsoft\\.AspNetCore.*$/',
'/^Microsoft\\.Extensions.*$/',
'Serilog.AspNetCore',
'System.Text.Json',
],
allowedVersions: '<9.0.0',
matchCurrentVersion: '<9.0.0',
},
{
// See the corresponding comment in Directory.Packages.props.
matchPackageNames: [
// See the corresponding comment in Directory.Packages.props.
'System.Drawing.Common',
],
enabled: false,
Expand Down Expand Up @@ -85,5 +98,5 @@
schedule: [
'before 5am on Sunday',
],
labels: ['dependencies'],
addLabels: ['dependencies'],
}

0 comments on commit a3b6f9e

Please sign in to comment.