Skip to content

Commit

Permalink
Update renovate.json
Browse files Browse the repository at this point in the history
add workaround from renovatebot/renovate#8231 to bump version in Chart.yaml, when image tag gets updated
  • Loading branch information
christianhuth authored Nov 28, 2022
1 parent ece4e68 commit b2eda3b
Showing 1 changed file with 26 additions and 1 deletion.
27 changes: 26 additions & 1 deletion renovate.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,30 @@
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": ["config:base", ":disableDependencyDashboard"],
"bumpVersion": "patch",
"additionalBranchPrefix": "{{parentDir}}-"
"additionalBranchPrefix": "{{parentDir}}-",
"packageRules": [
{
"matchManagers": [
"helm-requirements",
"helm-values",
],
"postUpgradeTasks": {
"commands": [
`version=$(grep '^version:' {{{parentDir}}}/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" {{{parentDir}}}/Chart.yaml
cat {{{parentDir}}}/Chart.yaml
`
],
"fileFilters": [
"**/Chart.yaml",
],
"executionMode": "branch",
},
},
]
}

0 comments on commit b2eda3b

Please sign in to comment.