Created
March 31, 2021 20:20
-
-
Save bianpengyuan/d583631bb4dd9c1938353e12d2c5a865 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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