deployment: update get-envoy script and release hooks (#2111)

This commit is contained in:
Travis Groth 2021-04-21 16:00:16 -04:00 committed by GitHub
parent 3b1e5a9a48
commit 2b59db27be
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 21 deletions

View file

@ -5,17 +5,8 @@ PATH="$PATH:$(go env GOPATH)/bin"
export PATH
_envoy_version=1.17.1
_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)/../bin"
_target="${TARGET:-"$(go env GOOS)_$(go env GOARCH)"}"
if [[ "${_target}" == darwin_* ]]; then
_envoy_platform="darwin"
elif [[ "${_target}" == linux_* ]]; then
_envoy_platform="linux_glibc"
else
echo "unsupported TARGET: ${_target}"
exit 1
fi
_dir="${DIR:-"$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)/../bin"}"
_target="${TARGET:-"$(go env GOOS)-$(go env GOARCH)"}"
is_command() {
command -v "$1" >/dev/null
@ -42,13 +33,6 @@ hash_sha256() {
}
mkdir -p "$_dir"
if [ "$_target" == "linux_arm64" ]; then
mkdir -p "$_dir"
curl -L -o "$_dir/envoy" https://github.com/pomerium/envoy-binaries/releases/download/v${_envoy_version}/envoy-linux-arm64
else
env HOME="$_dir" getenvoy fetch standard:${_envoy_version}/${_envoy_platform}
cp -f "$_dir/.getenvoy/builds/standard/${_envoy_version}/${_envoy_platform}/bin/envoy" "$_dir/envoy"
fi
curl -L -o "$_dir/envoy" "https://github.com/pomerium/envoy-binaries/releases/download/v${_envoy_version}/envoy-${_target}"
hash_sha256 "$_dir/envoy" >"$_dir/envoy.sha256"