Skip to content

Commit

Permalink
chore: すべての依存をRenovateの対象にする (#839)
Browse files Browse the repository at this point in the history
次の2つの"group"にまとめる形で、あらゆる依存をRenovateの自動PRの対象にす
る。

* "major dependencies" (`renovate/major-dependencies`)
* "non-major dependencies" (`renovate/non-major-dependencies`)

0.y.zのy(ただしy≧1)、0.0.zのzの変更は"major dependencies"側に分類す
る。Rustのバージョンは"non-major"側。

運用としては二つのPRを**普段は保持し続け、更新可能ライブラリを把握する目
的に留める**。そして6週間おきのRustのリリースのタイミングで"non-major"の
PRを「収穫」し、"major"の方はしかるべき機会が来たら収穫する。

このリポジトリにおいては懸念が一つあり、Gradle Wrapperのアップデートに失
敗してgradle-wrapper.jarを消し飛ばしたPRが生成されてしまう。ただどういう
感じの現象なのかまだ不明であるし、Gradle Wrapperのバージョンだけ手動で更
新すれば回避可能であると思われることから、このPRでは除外設定はしない。

Resolves #470.

Co-authored-by: Hiroshiba <hihokaruta@gmail.com>
  • Loading branch information
qryxip and Hiroshiba committed Sep 29, 2024
1 parent f75ce9d commit 521cd54
Show file tree
Hide file tree
Showing 2 changed files with 90 additions and 41 deletions.
41 changes: 0 additions & 41 deletions renovate.json

This file was deleted.

90 changes: 90 additions & 0 deletions renovate.json5
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
{
$schema: "https://docs.renovatebot.com/renovate-schema.json",
extends: [
"config:recommended",
],
timezone: "Asia/Tokyo",
separateMajorMinor: false,
dependencyDashboardApproval: true, // 万が一`packageRules`の網羅性に穴ができた場合に備え
packageRules: [
// `separateMajorMinor`を無効化した上で次の二つのgroupにすべてをまとめる。
//
// * "major dependencies" (`renovate/major-dependencies`)
// * "non-major dependencies" (`renovate/non-major-dependencies`)
//
// バージョン0.y.z (y≧1)のyとバージョン0.0.zのzの変更は"major dependencies"の方に含むようにする。

// メジャーバージョンの更新
{
groupName: "major dependencies",
matchUpdateTypes: [
"major",
],
dependencyDashboardApproval: false,
},
{
groupName: "major dependencies",
matchUpdateTypes: [
"minor",
],
matchCurrentVersion: "/^v?0\\./",
dependencyDashboardApproval: false,
},
{
groupName: "major dependencies",
matchUpdateTypes: [
"patch",
],
matchCurrentVersion: "/^v?0\\.0\\./",
dependencyDashboardApproval: false,
},

// メジャーバージョン以外の更新
{
groupName: "non-major dependencies",
matchUpdateTypes: [
"minor",
],
matchCurrentVersion: "!/^v?0\\./",
dependencyDashboardApproval: false,
},
{
groupName: "non-major dependencies",
matchUpdateTypes: [
"patch",
],
matchCurrentVersion: "!/^v?0\\.0\\./",
dependencyDashboardApproval: false,
},

// GHAのrunnerに対しては無効化する
{
matchDatasources: [
"github-runners",
],
matchPackageNames: [
"windows",
"macos",
"ubuntu",
],
enabled: false,
},
],
cargo: {
rangeStrategy: "bump",
},
customManagers: [
{
customType: "regex",
fileMatch: [
"^rust-toolchain$",
],
matchStrings: [
"(?<currentValue>\\d+\\.\\d+\\.\\d+)",
],
depNameTemplate: "Rust",
packageNameTemplate: "rust-lang/rust",
datasourceTemplate: "github-tags",
},
],
}

0 comments on commit 521cd54

Please sign in to comment.