From d384abe77dbf19e1c5206944ef68f29f1d63272d Mon Sep 17 00:00:00 2001 From: Ed Page Date: Thu, 9 Nov 2023 16:15:18 -0600 Subject: [PATCH] chore(ci): Auto-update versions Once infra enables RenovateBot, this will - Create individual PRs for breaking changes - Combined PRs for compatible changes This also auto-updates MSRV, like cargo and clap do, to avoid stagnation and people getting the wrong impression of the MSRV policy from that stagnation. This also avoids contributors being hesitant about what justifies updating MSRV. --- .github/renovate.json5 | 107 +++++++++++++++++++++++++++++++++++++++ .github/workflows/ci.yml | 2 +- Cargo.toml | 2 +- 3 files changed, 109 insertions(+), 2 deletions(-) create mode 100644 .github/renovate.json5 diff --git a/.github/renovate.json5 b/.github/renovate.json5 new file mode 100644 index 0000000..21d082f --- /dev/null +++ b/.github/renovate.json5 @@ -0,0 +1,107 @@ +{ + schedule: [ + 'before 5am on the first day of the month', + ], + semanticCommits: 'enabled', + configMigration: true, + dependencyDashboard: true, + customManagers: [ + { + customType: 'regex', + fileMatch: [ + '^rust-toolchain\\.toml$', + 'Cargo.toml$', + 'clippy.toml$', + '\\.clippy.toml$', + '^\\.github/workflows/ci.yml$', + '^\\.github/workflows/rust-next.yml$', + ], + matchStrings: [ + 'MSRV.*?(?\\d+\\.\\d+(\\.\\d+)?)', + '(?\\d+\\.\\d+(\\.\\d+)?).*?MSRV', + ], + depNameTemplate: 'rust', + packageNameTemplate: 'rust-lang/rust', + datasourceTemplate: 'github-releases', + }, + ], + packageRules: [ + { + commitMessageTopic: 'MSRV', + matchManagers: [ + 'regex', + ], + matchPackageNames: [ + 'rust', + ], + minimumReleaseAge: '84 days', // 2 releases back * 6 weeks per release * 7 days per week + internalChecksFilter: 'strict', + extractVersion: '^(?\\d+\\.\\d+)', // Drop the patch version + schedule: [ + '* * * * *', + ], + }, + // Goals: + // - Keep version reqs low, ignoring compatible normal/build dependencies + // - Take advantage of latest dev-dependencies + // - Rollup safe upgrades to reduce CI runner load + // - Help keep number of versions down by always using latest breaking change + // - Have lockfile and manifest in-sync + { + matchManagers: [ + 'cargo', + ], + matchDepTypes: [ + 'build-dependencies', + 'dependencies', + ], + matchCurrentVersion: '>=0.1.0', + matchUpdateTypes: [ + 'patch', + ], + enabled: false, + }, + { + matchManagers: [ + 'cargo', + ], + matchDepTypes: [ + 'build-dependencies', + 'dependencies', + ], + matchCurrentVersion: '>=1.0.0', + matchUpdateTypes: [ + 'minor', + ], + enabled: false, + }, + { + matchManagers: [ + 'cargo', + ], + matchDepTypes: [ + 'dev-dependencies', + ], + matchCurrentVersion: '>=0.1.0', + matchUpdateTypes: [ + 'patch', + ], + automerge: true, + groupName: 'compatible (dev)', + }, + { + matchManagers: [ + 'cargo', + ], + matchDepTypes: [ + 'dev-dependencies', + ], + matchCurrentVersion: '>=1.0.0', + matchUpdateTypes: [ + 'minor', + ], + automerge: true, + groupName: 'compatible (dev)', + }, + ], +} diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 50c2ddf..3a3d812 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -49,7 +49,7 @@ jobs: - name: No-default features run: cargo test --workspace --no-default-features msrv: - name: "Check MSRV: 1.70" + name: "Check MSRV: 1.70" # MSRV runs-on: ubuntu-latest steps: - name: Checkout repository diff --git a/Cargo.toml b/Cargo.toml index 497c1cd..8666651 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,7 +2,7 @@ name = "annotate-snippets" version = "0.9.2" edition = "2021" -rust-version = "1.70.0" +rust-version = "1.70" # MSRV authors = ["Zibi Braniecki "] description = "Library for building code annotations" license = "Apache-2.0/MIT"