chore: Move split by slash from renovate.json to bash script

Signed-off-by: Marco Maurer <mkilchhofer@users.noreply.github.com>
This commit is contained in:
Marco Maurer 2025-01-27 23:09:40 +01:00
parent 5bbabebab7
commit de352a19a5
2 changed files with 4 additions and 1 deletions

View file

@ -90,7 +90,7 @@
],
"commitMessagePrefix": "chore({{parentDir}}):",
"postUpgradeTasks": {
"commands": ["./scripts/renovate-bump-version.sh -c {{parentDir}} -d {{{lookup (split depName '/') @last}}} -v {{newVersion}}"]
"commands": ["./scripts/renovate-bump-version.sh -c {{parentDir}} -d {{ depName }} -v {{newVersion}}"]
}
},
{

View file

@ -19,6 +19,9 @@ if [ -z "${dependency_name}" ] || [ -z "${dependency_version}" ] || [ -z "${char
fi
chart_yaml_path="charts/${chart}/Chart.yaml"
# Split dependency by '/' and only use last element
# This way we can drop prefixes like "argoproj/..." , "argoproj-labs/..." , "quay.io/foo/..."
dependency_name="${dependency_name##*/}"
# Bump the chart version by one patch version
version=$(grep '^version:' "${chart_yaml_path}" | awk '{print $2}')