mirror of
https://github.com/kubernetes-sigs/node-feature-discovery.git
synced 2025-03-14 20:56:42 +00:00
scripts/update-gh-pages: slightly cleaner log output
This commit is contained in:
parent
ba51a92d63
commit
fa5272eaeb
1 changed files with 8 additions and 8 deletions
|
@ -48,24 +48,24 @@ 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
|
||||
|
||||
# Check if the asset has changed
|
||||
asset_id_old=`cat "$asset_name".id 2> /dev/null || :`
|
||||
if [[ $asset_id_old == $asset_id ]]; then
|
||||
echo "$asset_name (id=$asset_id) unchanged, skipping..."
|
||||
echo " $asset_name (id=$asset_id) unchanged, skipping..."
|
||||
continue
|
||||
fi
|
||||
|
||||
# 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"
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue