Skip to content

Commit

Permalink
Merge pull request #807 from kelvintaywl-cci/update-install.sh
Browse files Browse the repository at this point in the history
feat: allow installer to download releases for ARM64
  • Loading branch information
JulesFaucherre authored May 10, 2023
2 parents 2259641 + 1e54f4d commit 9fdccf5
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 --ssl-reqd -sL --retry 3 "${RELEASE_URL}" | tar zx --strip 1
Expand Down

0 comments on commit 9fdccf5

Please sign in to comment.