From c6358f4892a3477e2b59c98f451e45790d675639 Mon Sep 17 00:00:00 2001 From: Kjeld Schouten Date: Sat, 18 Nov 2023 16:48:47 +0100 Subject: [PATCH] Update renovate-config.js Signed-off-by: Kjeld Schouten --- .github/renovate-config.js | 84 ++++---------------------------------- 1 file changed, 9 insertions(+), 75 deletions(-) diff --git a/.github/renovate-config.js b/.github/renovate-config.js index 3f6bf596473..8fb2525f66b 100644 --- a/.github/renovate-config.js +++ b/.github/renovate-config.js @@ -23,36 +23,14 @@ module.exports = { matchUpdateTypes: ["major"], postUpgradeTasks: { commands: [ - ` - if test -f "./charts/stable/{{{parentDir}}}/Chart.yaml"; then - train="stable" - elif test -f "./charts/incubator/{{{parentDir}}}/Chart.yaml"; then - train="incubator" - elif test -f "./charts/SCALE/{{{parentDir}}}/Chart.yaml"; then - train="SCALE" - elif test -f "./charts/library/{{{parentDir}}}/Chart.yaml"; then - train="library" - elif test -f "./charts/dependency/{{{parentDir}}}/Chart.yaml"; then - train="dependency" - elif test -f "./charts/core/{{{parentDir}}}/Chart.yaml"; then - train="core" - elif test -f "./charts/games/{{{parentDir}}}/Chart.yaml"; then - train="games" - elif test -f "./charts/enterprise/{{{parentDir}}}/Chart.yaml"; then - train="enterprise" - elif test -f "./charts/operators/{{{parentDir}}}/Chart.yaml"; then - train="operators" - else - train="incubator" - fi - version=$(grep '^version:' {{{parentDir}}}/Chart.yaml | awk '{print $2}') + ` version=$(grep '^version:' {{{packageFileDir}}}/Chart.yaml | awk '{print $2}') major=$(echo $version | cut -d. -f1) minor=$(echo $version | cut -d. -f2) patch=$(echo $version | cut -d. -f3) minor=$(expr $minor + 1) echo "Replacing $version with $major.$minor.$patch" - sed -i "s/^version:.*/version: $\{major\}.$\{minor\}.$\{patch\}/g" ./charts/${train}/{{{parentDir}}}/Chart.yaml - cat ./charts/${train}/{{{parentDir}}}/Chart.yaml + sed -i "s/^version:.*/version: $\{major\}.$\{minor\}.$\{patch\}/g" /{{{packageFileDir}}}/Chart.yaml + cat {{{packageFileDir}}}/Chart.yaml `, ], }, @@ -65,36 +43,14 @@ module.exports = { matchUpdateTypes: ["minor"], postUpgradeTasks: { commands: [ - ` - if test -f "./charts/stable/{{{parentDir}}}/Chart.yaml"; then - train="stable" - elif test -f "./charts/incubator/{{{parentDir}}}/Chart.yaml"; then - train="incubator" - elif test -f "./charts/SCALE/{{{parentDir}}}/Chart.yaml"; then - train="SCALE" - elif test -f "./charts/library/{{{parentDir}}}/Chart.yaml"; then - train="library" - elif test -f "./charts/dependency/{{{parentDir}}}/Chart.yaml"; then - train="dependency" - elif test -f "./charts/core/{{{parentDir}}}/Chart.yaml"; then - train="core" - elif test -f "./charts/games/{{{parentDir}}}/Chart.yaml"; then - train="games" - elif test -f "./charts/enterprise/{{{parentDir}}}/Chart.yaml"; then - train="enterprise" - elif test -f "./charts/operators/{{{parentDir}}}/Chart.yaml"; then - train="operators" - else - train="incubator" - fi - version=$(grep '^version:' {{{parentDir}}}/Chart.yaml | awk '{print $2}') + ` version=$(grep '^version:' {{{packageFileDir}}}/Chart.yaml | awk '{print $2}') major=$(echo $version | cut -d. -f1) minor=$(echo $version | cut -d. -f2) patch=$(echo $version | cut -d. -f3) minor=$(expr $minor + 1) echo "Replacing $version with $major.$minor.$patch" - sed -i "s/^version:.*/version: $\{major\}.$\{minor\}.$\{patch\}/g" ./charts/${train}/{{{parentDir}}}/Chart.yaml - cat ./charts/${train}/{{{parentDir}}}/Chart.yaml + sed -i "s/^version:.*/version: $\{major\}.$\{minor\}.$\{patch\}/g" /{{{packageFileDir}}}/Chart.yaml + cat {{{packageFileDir}}}/Chart.yaml `, ], }, @@ -107,36 +63,14 @@ module.exports = { matchUpdateTypes: ["patch", "digest", "pin"], postUpgradeTasks: { commands: [ - ` - if test -f "./charts/stable/{{{parentDir}}}/Chart.yaml"; then - train="stable" - elif test -f "./charts/incubator/{{{parentDir}}}/Chart.yaml"; then - train="incubator" - elif test -f "./charts/SCALE/{{{parentDir}}}/Chart.yaml"; then - train="SCALE" - elif test -f "./charts/library/{{{parentDir}}}/Chart.yaml"; then - train="library" - elif test -f "./charts/dependency/{{{parentDir}}}/Chart.yaml"; then - train="dependency" - elif test -f "./charts/core/{{{parentDir}}}/Chart.yaml"; then - train="core" - elif test -f "./charts/games/{{{parentDir}}}/Chart.yaml"; then - train="games" - elif test -f "./charts/enterprise/{{{parentDir}}}/Chart.yaml"; then - train="enterprise" - elif test -f "./charts/operators/{{{parentDir}}}/Chart.yaml"; then - train="operators" - else - train="incubator" - fi - version=$(grep '^version:' {{{parentDir}}}/Chart.yaml | awk '{print $2}') + ` version=$(grep '^version:' {{{packageFileDir}}}/Chart.yaml | awk '{print $2}') major=$(echo $version | cut -d. -f1) minor=$(echo $version | cut -d. -f2) patch=$(echo $version | cut -d. -f3) minor=$(expr $minor + 1) echo "Replacing $version with $major.$minor.$patch" - sed -i "s/^version:.*/version: $\{major\}.$\{minor\}.$\{patch\}/g" ./charts/${train}/{{{parentDir}}}/Chart.yaml - cat ./charts/${train}/{{{parentDir}}}/Chart.yaml + sed -i "s/^version:.*/version: $\{major\}.$\{minor\}.$\{patch\}/g" /{{{packageFileDir}}}/Chart.yaml + cat {{{packageFileDir}}}/Chart.yaml `, ], },