Skip to content

Commit

Permalink
feat: allow installer to download releases for ARM64
Browse files Browse the repository at this point in the history
  • Loading branch information
kelvintaywl committed Nov 15, 2022
1 parent 7cd9cc4 commit 1e54f4d
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ function error {

trap error ERR

# Determine release filename. This can be expanded with CPU arch in the future.
# Determine release filename.
case "$(uname)" in
Linux)
OS='linux'
Expand All @@ -48,7 +48,20 @@ case "$(uname)" in
;;
esac

RELEASE_URL="${GITHUB_BASE_URL}/releases/download/v${VERSION}/circleci-cli_${VERSION}_${OS}_amd64.tar.gz"
case "$(uname -m)" in
aarch64 | arm64)
ARCH='arm64'
;;
x86_64)
ARCH="amd64"
;;
*)
echo "This architecture is not supported."
exit 1
;;
esac

RELEASE_URL="${GITHUB_BASE_URL}/releases/download/v${VERSION}/circleci-cli_${VERSION}_${OS}_${ARCH}.tar.gz"

# Download & unpack the release tarball.
curl -sL --retry 3 "${RELEASE_URL}" | tar zx --strip 1
Expand Down

0 comments on commit 1e54f4d

Please sign in to comment.