mirror of
https://github.com/fluxcd/flux2.git
synced 2026-02-09 17:27:28 +00:00
Update Toolkit component update script
To recognize and correctly replace the versions in the components' Kustomization files. Signed-off-by: Hidde Beydals <hello@hidde.co>
This commit is contained in:
parent
2cd3c32ca7
commit
6db84269af
1 changed files with 2 additions and 2 deletions
4
.github/workflows/update.yaml
vendored
4
.github/workflows/update.yaml
vendored
|
|
@ -21,11 +21,11 @@ jobs:
|
|||
|
||||
bump_version() {
|
||||
local RELEASE_VERSION=$(curl -s https://api.github.com/repos/fluxcd/$1/releases | jq -r 'sort_by(.published_at) | .[-1] | .tag_name')
|
||||
local CURRENT_VERSION=$(sed -n "s/.*$1\/archive\/\(.*\).zip.*/\1/p;n" manifests/bases/$1/kustomization.yaml)
|
||||
local CURRENT_VERSION=$(sed -n "s/.*$1\/releases\/download\/\(.*\)\/.*/\1/p;n" manifests/bases/$1/kustomization.yaml)
|
||||
|
||||
if [[ "${RELEASE_VERSION}" != "${CURRENT_VERSION}" ]]; then
|
||||
# bump kustomize
|
||||
sed -i "s/\($1\/archive\/\)v.*\(.zip\/\/$1-\).*\(\/config.*\)/\1${RELEASE_VERSION}\2${RELEASE_VERSION/v}\3/g" "manifests/bases/$1/kustomization.yaml"
|
||||
sed -i "s/\($1\/releases\/download\/\)v.*\(\/.*\)/\1${RELEASE_VERSION}\2/g" "manifests/bases/$1/kustomization.yaml"
|
||||
|
||||
if [[ ! -z $(go list -m all | grep "github.com/fluxcd/$1/api" | awk '{print $2}') ]]; then
|
||||
# bump go mod
|
||||
|
|
|
|||
Loading…
Reference in a new issue