Skip to content

Instantly share code, notes, and snippets.

@bianpengyuan
Created March 31, 2021 20:20
Show Gist options
  • Save bianpengyuan/d583631bb4dd9c1938353e12d2c5a865 to your computer and use it in GitHub Desktop.
Save bianpengyuan/d583631bb4dd9c1938353e12d2c5a865 to your computer and use it in GitHub Desktop.
#!/bin/sh
# Donwload latest Istio release and replace istioctl command to the latest
set -x
set -e
LATEST_COMMIT=$(curl https://storage.googleapis.com/istio-build/dev/latest)
ISTIO_RELEASE=istio-${LATEST_COMMIT}
URL="https://gcsweb.istio.io/gcs/istio-build/dev/${LATEST_COMMIT}/${ISTIO_RELEASE}-linux-amd64.tar.gz"
TEMP_DIR=$(mktemp -d)
WORKSPACE="$HOME/workspace/istio-dev-release"
trap 'rm -r ${TEMP_DIR}' EXIT
rm -rf ${WORKSPACE}/*
wget -qO- ${URL} | tar -xvz -C ${TEMP_DIR}
mv ${TEMP_DIR}/${ISTIO_RELEASE}/* ${WORKSPACE}/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment