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

add custom versioning matchers #305

Merged
merged 6 commits into from
Aug 29, 2024
Merged
Changes from 5 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
46 changes: 43 additions & 3 deletions .github/renovate-config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module.exports = {
extends: [],
// https://docs.renovatebot.com/self-hosted-configuration/#dryrun
dryRun: false,
dryRun: null,
// https://docs.renovatebot.com/configuration-options/#gitauthor
gitAuthor: "bugclerk <[email protected]>",
// https://docs.renovatebot.com/self-hosted-configuration/#onboarding
Expand All @@ -17,9 +17,10 @@ module.exports = {
// https://docs.renovatebot.com/self-hosted-configuration/#allowedpostupgradecommands
// TODO: Restrict this.
allowedPostUpgradeCommands: ["^.*"],
enabledManagers: ["regex", "github-actions"],
enabledManagers: ["custom.regex", "github-actions"],
customManagers: [
{
customType: "regex",
// Match only ix_values.yaml files in the ix-dev directory
fileMatch: ["^ix-dev/.*/ix_values\\.yaml$"],
// Matches the repository name and the tag of each image
Expand All @@ -32,7 +33,7 @@ module.exports = {
],
packageRules: [
{
matchManagers: ["regex"],
matchManagers: ["custom.regex"],
matchDatasources: ["docker"],
postUpgradeTasks: {
// What to "git add" after the commands are run
Expand Down Expand Up @@ -64,5 +65,44 @@ module.exports = {
groupName: "updates-patch-minor",
labels: ["patch"],
},
// Custom versioning matching
customVersioning(
// There are tags with date format (24.08.0), but newer versions are semver
"^(?<major>\\d{2})\\.(?<minor>\\d+)\\.(?<patch>\\d+)$",
["linuxserver/deluge", "linuxserver/diskover"]
),
customVersioning(
// Older versions was 20220101 and newer versions are 240101
"^(?<major>\\d{2})(?<minor>\\d{2})(?<patch>\\d{2})$",
["photoprism/photoprism"]
),
customVersioning(
// RELEASE.2024-08-26T15-33-07Z
"^RELEASE\\.(?<major>\\d+)-(?<minor>\\d+)-(?<patch>\\d+)T\\d+-\\d+-\\d+Z$",
["minio/minio"]
),
customVersioning(
// version-6.0.0
"^version-(?<major>\\d+)\\.(?<minor>\\d+)\\.(?<patch>\\d+)$",
["fireflyiii/core", "fireflyiii/data-importer"]
),
customVersioning(
// 2024-08-29
"^(?<major>\\d+)-(?<minor>\\d+)-(?<patch>\\d+)$",
["alexta69/metube"]
),
customVersioning(
// 2.462.1-jdk17
"^(?<major>\\d+)\\.(?<minor>\\d+)-jdk17",
["jenkins/jenkins"]
),
],
};

function customVersioning(versioningRegex, packages) {
return {
matchDatasources: ["docker"],
versioning: `regex:${versioningRegex}`,
matchPackageNames: packages,
};
}
Loading