1
0
Fork 0
mirror of https://github.com/kubernetes-sigs/node-feature-discovery.git synced 2025-03-15 04:57:56 +00:00

scripts/update-gh-pages: slightly cleaner log output

This commit is contained in:
Markus Lehtonen 2021-03-18 19:27:41 +02:00
parent ba51a92d63
commit fa5272eaeb

View file

@ -48,7 +48,7 @@ update_helm_repo_index() {
eval `echo $asset_meta | jq -r '{id, name, url, browser_download_url} | keys[] as $k | "local asset_\($k)=\(.[$k])"'`
if [[ "$asset_name" != node-feature-discovery-chart-*tgz ]]; then
echo "Asset $asset_name does not look like a Helm chart archive, skipping..."
echo " $asset_name does not look like a Helm chart archive, skipping..."
continue
fi
@ -62,10 +62,10 @@ update_helm_repo_index() {
# Update helm repo index
local tmpdir="`mktemp -d`"
echo "Downloading $asset_name..."
echo " downloading $asset_name..."
curl -sSfL -H "Accept:application/octet-stream" -o "$tmpdir/$asset_name" $asset_url
echo "Updating helm index for $asset_name..."
echo " updating helm index for $asset_name..."
local download_baseurl=`dirname $asset_browser_download_url`
helm repo index "$tmpdir" --merge index.yaml --url $download_baseurl
cp "$tmpdir/index.yaml" .
@ -182,7 +182,7 @@ else
fi
# Switch to work in the gh-pages worktree
pushd "$build_dir"
pushd "$build_dir" > /dev/null
_stable=`(ls -d1 v*/ || :) | sort -n | tail -n1`
[ -n "$_stable" ] && ln -sfT "$_stable" stable
@ -197,9 +197,9 @@ EOF
# Update Helm repo
mkdir -p charts
pushd charts
pushd charts > /dev/null
update_helm_repo_index
popd
popd > /dev/null
# Check if there were any changes in the repo
if [ -z "`git status --short`" ]; then
@ -214,7 +214,7 @@ echo "Committing changes..."
git add .
git commit $amend -m "$commit_msg"
popd
popd > /dev/null
echo "gh-pages branch successfully updated"