Update renovate-config.js

Signed-off-by: Kjeld Schouten <kjeld@schouten-lebbing.nl>
This commit is contained in:
Kjeld Schouten 2023-11-18 16:48:47 +01:00 committed by GitHub
parent fecc657679
commit c6358f4892
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 75 deletions

View File

@ -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
`,
],
},