feat(ci): Auto add/update/replace sources with TC git repo link (#3336)
* no need to quote the link * auto add/replace/update source with tc git repo link
This commit is contained in:
12
.github/scripts/gen-docs.sh
vendored
12
.github/scripts/gen-docs.sh
vendored
@@ -27,7 +27,17 @@ 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"
|
||||
sed -i -e "s|home: .*|home: https:\/\/truecharts.org\/docs\/charts\/${train}\/${chartname}|" "${chart}/Chart.yaml"
|
||||
# Get all sources (except truecharts)
|
||||
curr_sources=$(yq '.sources[] | select(. != "https://github.com/truecharts*")' "${chart}/Chart.yaml")
|
||||
# Empty sources list in-place
|
||||
yq -i 'del(.sources.[])' "${chart}/Chart.yaml"
|
||||
# Add truechart source
|
||||
tcsource="https://github.com/truecharts/charts/tree/master/charts/$train/$chartname" yq -i '.sources += env(tcsource)' "${chart}/Chart.yaml"
|
||||
# Add the rest of the sources
|
||||
while IFS= read -r line; do
|
||||
src="$line" yq -i '.sources += env(src)' "${chart}/Chart.yaml"
|
||||
done <<< "$curr_sources"
|
||||
}
|
||||
export -f sync_tag
|
||||
|
||||
|
||||
Reference in New Issue
Block a user