From e11ff9576e9df78b424edf7b50db3c9991194578 Mon Sep 17 00:00:00 2001 From: Robert Sturla Date: Tue, 19 Dec 2023 17:18:36 +0000 Subject: [PATCH 1/5] Add Renovate configuration with custom regex manager --- .github/renovate.json5 | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 .github/renovate.json5 diff --git a/.github/renovate.json5 b/.github/renovate.json5 new file mode 100644 index 0000000..b2b57e5 --- /dev/null +++ b/.github/renovate.json5 @@ -0,0 +1,14 @@ +{ + "extends": [ + "config:recommended", + ], + "regexManagers": [ + { + "fileMatch": ["^.+\\.spec$"], + "matchStrings": [ + "#\\s?renovate: datasource=(?.*?) depName=(?.*?)( versioning=(?.*?))?( extractVersion=(?.*?))\\s*Version:\\s*(?.*)\\s" + ], + "versioningTemplate": "{{#if versioning}}{{{versioning}}}{{else}}semver{{/if}}" + } + ] +} From 95e1305f8c77be5771a611e7dacb08922767af1d Mon Sep 17 00:00:00 2001 From: Robert Sturla Date: Tue, 19 Dec 2023 23:11:32 +0000 Subject: [PATCH 2/5] Fix Renovate configuration --- .github/renovate.json5 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/renovate.json5 b/.github/renovate.json5 index b2b57e5..fb626ba 100644 --- a/.github/renovate.json5 +++ b/.github/renovate.json5 @@ -4,9 +4,9 @@ ], "regexManagers": [ { - "fileMatch": ["^.+\\.spec$"], + "fileMatch": [".*\\.spec"], "matchStrings": [ - "#\\s?renovate: datasource=(?.*?) depName=(?.*?)( versioning=(?.*?))?( extractVersion=(?.*?))\\s*Version:\\s*(?.*)\\s" + "#\\s?renovate: datasource=(?.*?) depName=(?.*?)( versioning=(?.*?))?( extractVersion=(?.*?))?\\s*Version:\\s*(?.*)\\s" ], "versioningTemplate": "{{#if versioning}}{{{versioning}}}{{else}}semver{{/if}}" } From 9c009780479bd04965fe8f39f28156b2987228e2 Mon Sep 17 00:00:00 2001 From: Robert Sturla Date: Tue, 19 Dec 2023 23:11:42 +0000 Subject: [PATCH 3/5] Manage devpod version with Renovate --- staging/devpod/devpod.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/staging/devpod/devpod.spec b/staging/devpod/devpod.spec index 6934210..1dc6e1d 100644 --- a/staging/devpod/devpod.spec +++ b/staging/devpod/devpod.spec @@ -1,4 +1,5 @@ Name: devpod +# renovate: datasource=github-releases depName=loft-sh/devpod Version: v0.4.2 Release: 1%{?dist} Summary: Codespaces but open-source, client-only and unopinionated. From 75a7cd0e834bea35303715e297e509cd0fec260e Mon Sep 17 00:00:00 2001 From: Robert Sturla Date: Tue, 19 Dec 2023 23:15:01 +0000 Subject: [PATCH 4/5] Add simple workflow to validate Renovate configuration --- .github/workflows/renovate.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 .github/workflows/renovate.yml diff --git a/.github/workflows/renovate.yml b/.github/workflows/renovate.yml new file mode 100644 index 0000000..d8b6dd3 --- /dev/null +++ b/.github/workflows/renovate.yml @@ -0,0 +1,25 @@ +name: Validate Renovate + +on: + pull_request: + paths: + - "**/renovate.json" + - "**/renovate.json5" + +jobs: + validate: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup Node.js + uses: actions/setup-node@v3 + with: + node-version: latest + + - name: Install dependencies + run: npm install -g renovate + + - name: Validate Renovate config + run: renovate-config-validator --strict From 0b4b304a9832313e57289910374409b654a011b3 Mon Sep 17 00:00:00 2001 From: Robert Sturla Date: Tue, 19 Dec 2023 23:16:47 +0000 Subject: [PATCH 5/5] Use newer Renovate custom manager syntax --- .github/renovate.json5 | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/renovate.json5 b/.github/renovate.json5 index fb626ba..b41fd4a 100644 --- a/.github/renovate.json5 +++ b/.github/renovate.json5 @@ -1,9 +1,8 @@ { - "extends": [ - "config:recommended", - ], - "regexManagers": [ + "extends": ["config:recommended"], + "customManagers": [ { + "customType": "regex", "fileMatch": [".*\\.spec"], "matchStrings": [ "#\\s?renovate: datasource=(?.*?) depName=(?.*?)( versioning=(?.*?))?( extractVersion=(?.*?))?\\s*Version:\\s*(?.*)\\s"