Skip to content

Instantly share code, notes, and snippets.

@jdolitsky
Last active May 17, 2019 21:57
Show Gist options
  • Save jdolitsky/0ec804b09f24a24b05acb681f01903c9 to your computer and use it in GitHub Desktop.
Save jdolitsky/0ec804b09f24a24b05acb681f01903c9 to your computer and use it in GitHub Desktop.
Simple script to install Helm v3.0.0-alpha.1 on macOS to /tmp
#!/bin/bash -ex
export HELM_HOME="/tmp/helm3"
mkdir -p "${HELM_HOME}/bin"
rm -f helm-release.tar.gz
wget -O helm-release.tar.gz https://get.helm.sh/helm-v3.0.0-alpha.1-darwin-amd64.tar.gz
if [[ "$(openssl dgst -sha256 helm-release.tar.gz | awk '{print $2}')" != "f562e5bbb5b8b8a6a46c080970c1fea35ff908a1402f56e5d4c8f327c9ff4835" ]]; then
echo "checksum does not match"
exit 1
fi
rm -rf helm-download/ && mkdir -p helm-download/
tar xf helm-release.tar.gz -C helm-download/ --strip-components 1
chmod +x helm-download/helm
mv helm-download/helm "${HELM_HOME}/bin"
rm -rf helm-release.tar.gz helm-download/
export PATH="${HELM_HOME}/bin:${PATH}"
helm init
helm version
set +x
echo
echo "Helm v3.0.0-alpha.1 has been installed. Please run the following to use:"
echo
echo " export HELM_HOME=\"/tmp/helm3\""
echo " export PATH=\"\${HELM_HOME}/bin:\${PATH}\""
echo " helm version"
echo
echo "If you'd like to use Helm 3 in all new terminal sessions, please run the following:"
echo
echo " echo 'export HELM_HOME=\"/tmp/helm3\"' >> \"\${HOME}/.bash_profile\""
echo " echo 'export PATH=\"\${HELM_HOME}/bin:\${PATH}\"' >> \"\${HOME}/.bash_profile\""
echo
@jdolitsky
Copy link
Author

If you're the trusting type, you can use this one-liner to run this script:

curl https://gist.githubusercontent.com/jdolitsky/0ec804b09f24a24b05acb681f01903c9/raw/install_helm3alpha1_mac.sh | bash

For more info on Helm v3.0.0-alpha.1, please see the release notes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment