From e93a6b175515957eb8fa43e86ba83b9d0c42bd8d Mon Sep 17 00:00:00 2001 From: Stavros Kois <47820033+stavros-k@users.noreply.github.com> Date: Sun, 31 Jul 2022 23:27:36 +0300 Subject: [PATCH] chore(ci): cleanup ci (#3366) --- .github/scripts/gen-docs.sh | 11 +---------- tools/build-release.sh | 11 +---------- 2 files changed, 2 insertions(+), 20 deletions(-) diff --git a/.github/scripts/gen-docs.sh b/.github/scripts/gen-docs.sh index 485e1061fc9..52787d9a8d1 100755 --- a/.github/scripts/gen-docs.sh +++ b/.github/scripts/gen-docs.sh @@ -33,26 +33,17 @@ sync_tag() { echo "Updating home of ${chartname}..." sed -i -e "s|home: .*|home: https:\/\/truecharts.org\/docs\/charts\/${train}\/${chartname}|" "${chart}/Chart.yaml" echo "Attempting to update sources of ${chartname}..." - go-yq -V + echo "Using go-yq verion: <$(go-yq -V)>" # Get all sources (except truecharts) curr_sources=$(go-yq '.sources[] | select(. != "https://github.com/truecharts*")' "${chart}/Chart.yaml") - echo "${chartname}: $curr_sources" - echo "${chartname}: After getting all sources" - cat "${chart}/Chart.yaml" # Empty sources list in-place go-yq -i 'del(.sources.[])' "${chart}/Chart.yaml" - echo "${chartname}: After deleting all sources" - cat "${chart}/Chart.yaml" # Add truechart source tcsource="https://github.com/truecharts/charts/tree/master/charts/$train/$chartname" go-yq -i '.sources += env(tcsource)' "${chart}/Chart.yaml" - echo "${chartname}: After adding tc source" - cat "${chart}/Chart.yaml" # Add the rest of the sources while IFS= read -r line; do src="$line" go-yq -i '.sources += env(src)' "${chart}/Chart.yaml" done <<< "$curr_sources" - echo "${chartname}: After adding the rest of the sources" - cat "${chart}/Chart.yaml" echo "Sources of ${chartname} updated!" } export -f sync_tag diff --git a/tools/build-release.sh b/tools/build-release.sh index 4f0fb4eba60..cb4fcfa7839 100755 --- a/tools/build-release.sh +++ b/tools/build-release.sh @@ -302,26 +302,17 @@ sync_tag() { echo "Updating home of ${chartname}..." sed -i -e "s|home: .*|home: https:\/\/truecharts.org\/docs\/charts\/${train}\/${chartname}|" "${chart}/Chart.yaml" echo "Attempting to update sources of ${chartname}..." - go-yq -V + echo "Using go-yq verion: <$(go-yq -V)>" # Get all sources (except truecharts) curr_sources=$(go-yq '.sources[] | select(. != "https://github.com/truecharts*")' "${chart}/Chart.yaml") - echo "${chartname}: $curr_sources" - echo "${chartname}: After getting all sources" - cat "${chart}/Chart.yaml" # Empty sources list in-place go-yq -i 'del(.sources.[])' "${chart}/Chart.yaml" - echo "${chartname}: After deleting all sources" - cat "${chart}/Chart.yaml" # Add truechart source tcsource="https://github.com/truecharts/charts/tree/master/charts/$train/$chartname" go-yq -i '.sources += env(tcsource)' "${chart}/Chart.yaml" - echo "${chartname}: After adding tc source" - cat "${chart}/Chart.yaml" # Add the rest of the sources while IFS= read -r line; do src="$line" go-yq -i '.sources += env(src)' "${chart}/Chart.yaml" done <<< "$curr_sources" - echo "${chartname}: After adding the rest of the sources" - cat "${chart}/Chart.yaml" echo "Sources of ${chartname} updated!" } export -f sync_tag