memo

install google-cloud-sdk

More than 1 year has passed since last update.

reference

code

cd ~
_BASE_URL="https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/"
_FILE_NAME="google-cloud-sdk-158.0.0-darwin-x86_64.tar.gz"
curl -o $_FILE_NAME $_BASE_URL$_FILE_NAME
tar zxfv $_FILE_NAME

export CLOUDSDK_PYTHON="$(which python2.7)"
./google-cloud-sdk/install.sh
To install or remove components at your current SDK version [158.0.0], run:
  $ gcloud components install COMPONENT_ID
  $ gcloud components remove COMPONENT_ID

To update your SDK installation to the latest version [168.0.0], run:
  $ gcloud components update
# google-cloud-sdk
export CLOUDSDK_PYTHON="$(which python2.7)"
# modified path and completion
# The next line updates PATH for the Google Cloud SDK.
if [ -f "$HOME/google-cloud-sdk/path.zsh.inc" ]; then
    source "$HOME/google-cloud-sdk/path.zsh.inc"
fi

# The next line enables shell command completion for gcloud.
if [ -f "$HOME/google-cloud-sdk/completion.zsh.inc" ]; then
    source "$HOME/google-cloud-sdk/completion.zsh.inc"
fi