From ca56d9bf3a1c5e4ff034491fe9bf73aa8b60d303 Mon Sep 17 00:00:00 2001 From: Stavros Kois <47820033+stavros-k@users.noreply.github.com> Date: Thu, 28 Jul 2022 23:39:13 +0300 Subject: [PATCH] chore(docs): auto update home on chart.yaml (#3335) * chore(docs): auto update `home` on chart.yaml * add comment --- .github/scripts/gen-docs.sh | 2 ++ tools/build-release.sh | 2 ++ 2 files changed, 4 insertions(+) diff --git a/.github/scripts/gen-docs.sh b/.github/scripts/gen-docs.sh index 44624653b17..1440ec8541d 100755 --- a/.github/scripts/gen-docs.sh +++ b/.github/scripts/gen-docs.sh @@ -4,6 +4,7 @@ set -o nounset set -o pipefail # Designed to ensure the appversion in Chart.yaml is in sync with the primary App tag if found +# Also makes sure that home link is pointing to the correct url sync_tag() { local chart="$1" local chartname="$2" @@ -26,6 +27,7 @@ sync_tag() { tag="${tag%_}" tag="${tag%.}" sed -i -e "s|appVersion: .*|appVersion: \"${tag}\"|" "${chart}/Chart.yaml" + sed -i -e "s|home: .*|home: \"https:\/\/truecharts.org\/docs\/charts\/${train}\/${chartname}\"|" "${chart}/Chart.yaml" } export -f sync_tag diff --git a/tools/build-release.sh b/tools/build-release.sh index 29634ec2ac3..4c7c00799bb 100755 --- a/tools/build-release.sh +++ b/tools/build-release.sh @@ -273,6 +273,7 @@ gen_dh_cat() { export -f gen_dh_cat # Designed to ensure the appversion in Chart.yaml is in sync with the primary App tag if found +# Also makes sure that home link is pointing to the correct url sync_tag() { local chart="$1" local chartname="$2" @@ -295,6 +296,7 @@ sync_tag() { tag="${tag%_}" tag="${tag%.}" sed -i -e "s|appVersion: .*|appVersion: \"${tag}\"|" "${chart}/Chart.yaml" + sed -i -e "s|home: .*|home: \"https:\/\/truecharts.org\/docs\/charts\/${train}\/${chartname}\"|" "${chart}/Chart.yaml" } export -f sync_tag