Skip to content

Commit

Permalink
feat(src/default.json5): add a cutom manager to update self versions (#…
Browse files Browse the repository at this point in the history
…10)

* feat(src/default.json5): add a cutom manager to update self versions

* style: apply autofix
  • Loading branch information
risu729 authored Jan 2, 2025
1 parent 4508dbb commit 844c4bc
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 2 deletions.
14 changes: 13 additions & 1 deletion .github/renovate.json5
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
{
extends: ["github>risu729/renovate-config"],
// ref: https://docs.renovatebot.com/configuration-options/
$schema: "https://docs.renovatebot.com/renovate-schema.json",
extends: ["github>risu729/renovate-config#`1.1.0"],
// ref: https://docs.renovatebot.com/modules/manager/regex/#advanced-capture
customManagers: [
{
customType: "regex",
fileMatch: ["^README.md$"],
matchStrings: ["github>risu729/renovate-config#(?<currentValue>[0-9.]+)"],
datasourceTemplate: "github-releases",
depNameTemplate: "risu729/renovate-config",
},
],
}
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,11 @@ Add the following to your `renovate.json` file:
"extends": ["github>risu729/renovate-config"]
}
```

or to use a specific version:

```json
{
"extends": ["github>risu729/renovate-config#1.1.0"]
}
```
2 changes: 1 addition & 1 deletion default.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions src/default.json5
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
],
// ref: https://docs.renovatebot.com/modules/manager/regex/#advanced-capture
customManagers: [
// support mise
// renovate does not support tools not listed
// ref: https://docs.renovatebot.com/modules/manager/mise/#additional-information
{
Expand Down Expand Up @@ -80,6 +81,14 @@
packageNameTemplate: "jdx/mise",
matchStrings: ["version: (?<currentValue>.+)"],
},
// support renovate config presets
{
customType: "regex",
fileMatch: ["^(\\.github)/?renovate\\.json5?$"],
matchStrings: ["github>risu729/renovate-config#(?<currentValue>[0-9.]+)"],
datasourceTemplate: "github-releases",
depNameTemplate: "risu729/renovate-config",
},
],
packageRules: [
// use unstable versions
Expand Down

0 comments on commit 844c4bc

Please sign in to comment.