Skip to content

Commit

Permalink
fix: There is no build for macos on arm
Browse files Browse the repository at this point in the history
  • Loading branch information
Carl Düvel committed Jul 8, 2024
1 parent 073f89d commit e2eb4e6
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions lib/utils.bash
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,16 @@ getArch() {
}

download_release() {
local version filename url
local version filename url arch
version="$1"
filename="$2"
arch=$(getArch)
os=$(uname | tr '[:upper:]' '[:lower:]')
url="$GH_REPO/releases/download/${version}/tfenv_${os}_$(getArch)"

if [ "$os" == "darwin" ] && [ "${arch}" == "arm64" ]; then
url="$GH_REPO/releases/download/${version}/tfenv_darwin_amd64"
else
url="$GH_REPO/releases/download/${version}/tfenv_${os}_${arch}"
fi
echo "* Downloading $TOOL_NAME release $version..."
curl "${curl_opts[@]}" -o "$filename" -C - "$url" || fail "Could not download $url"
}
Expand Down

0 comments on commit e2eb4e6

Please sign in to comment.