feat(ci/build): support arm64 for cloud-agent (#3294)

This commit is contained in:
Akash Satheesan 2021-05-05 21:53:30 +05:30 committed by GitHub
parent 1c0f0eb60c
commit fa461ff8f1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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