Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(ci): cleanup ci #3366

Merged
merged 1 commit into from
Jul 31, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 1 addition & 10 deletions .github/scripts/gen-docs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
11 changes: 1 addition & 10 deletions tools/build-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down