From fa461ff8f1f01e11a9a6045ca8b7f0354b5567e6 Mon Sep 17 00:00:00 2001 From: Akash Satheesan Date: Wed, 5 May 2021 21:53:30 +0530 Subject: [PATCH] feat(ci/build): support arm64 for cloud-agent (#3294) --- ci/build/build-code-server.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/ci/build/build-code-server.sh b/ci/build/build-code-server.sh index 1ede7a88..c465f7e4 100755 --- a/ci/build/build-code-server.sh +++ b/ci/build/build-code-server.sh @@ -19,9 +19,15 @@ main() { fi if ! [ -f ./lib/coder-cloud-agent ]; then + echo "Downloading the cloud agent..." + + # for arch; we do not use OS from lib.sh and get our own. + # lib.sh normalizes macos to darwin - but cloud-agent's binaries do not + source ./ci/lib.sh OS="$(uname | tr '[:upper:]' '[:lower:]')" + set +e - curl -fsSL "https://storage.googleapis.com/coder-cloud-releases/agent/latest/$OS/cloud-agent" -o ./lib/coder-cloud-agent + curl -fsSL "https://github.com/cdr/cloud-agent/releases/latest/download/cloud-agent-$OS-$ARCH" -o ./lib/coder-cloud-agent chmod +x ./lib/coder-cloud-agent set -e fi