From fa6a5b3940fda069845253b91645f21ca0b20527 Mon Sep 17 00:00:00 2001 From: Caleb Doxsey Date: Mon, 17 Apr 2023 15:37:47 -0600 Subject: [PATCH] fix --- .github/workflows/release.yaml | 1 + scripts/fetch-envoy | 5 ++++- scripts/fetch-envoy-from-homebrew | 27 --------------------------- 3 files changed, 5 insertions(+), 28 deletions(-) delete mode 100644 scripts/fetch-envoy-from-homebrew diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 449e3d4..75a91ea 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -25,6 +25,7 @@ jobs: - name: Install homebrew run: | /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" + eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)" brew install oras - name: fetch envoy diff --git a/scripts/fetch-envoy b/scripts/fetch-envoy index 910b5f2..20aedeb 100755 --- a/scripts/fetch-envoy +++ b/scripts/fetch-envoy @@ -10,7 +10,10 @@ _bin_dir="${_project_root}/bin" download_undock() { _host_os="$(uname -s | tr '[:upper:]' '[:lower:]')" - _host_arch="$(uname -m)" + _host_arch="amd64" + if [ "$(uname -m)" == "arm64" ]; then + _host_arch="arm64" + fi _url="https://github.com/crazy-max/undock/releases/download/v0.4.0/undock_0.4.0_${_host_os}_${_host_arch}.tar.gz" mkdir -p "$_bin_dir" diff --git a/scripts/fetch-envoy-from-homebrew b/scripts/fetch-envoy-from-homebrew deleted file mode 100644 index ec79310..0000000 --- a/scripts/fetch-envoy-from-homebrew +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/bash -set -euo pipefail - -_tag="${1?"tag required"}" - -# homebrew doesn't use v, just a number triplet -_version="${_tag:1}" - -# AMD64 is not supported beyond 12.6 -oras pull ghcr.io/homebrew/core/envoy:"${_version}" --platform "darwin/amd64:macOS 12.6" -tar --extract \ - --file envoy--"${_version}".monterey.bottle.tar.gz \ - --directory . \ - --strip-components=3 \ - envoy/"${_version}"/bin/envoy -mv -f envoy envoy-darwin-amd64 - -oras pull ghcr.io/homebrew/core/envoy:"${_version}" --platform "darwin/arm64:macOS 13" -tar --extract \ - --file envoy--"${_version}".arm64_ventura.bottle.tar.gz \ - --directory . \ - --strip-components=3 \ - envoy/"${_version}"/bin/envoy -mv -f envoy envoy-darwin-arm64 - -shasum -a 256 envoy-darwin-amd64 >envoy-darwin-amd64.sha256 -shasum -a 256 envoy-darwin-arm64 >envoy-darwin-arm64.sha256