mirror of
https://github.com/edgelesssys/constellation.git
synced 2024-10-01 01:36:09 -04:00
60fc73e0e7
* terraform: move module to legacy-directory * constellation-lib: refactor service account marshalling * terraform-provider: normalize Azure image URIs * constellation-lib: refactor Kubeconfig endpoint rewriting * terraform-provider: add conversion functions for AWS and GCP * terraform-provider: implement `constellation_cluster` resource * terraform-provider: refactor conversion * terraform-provider: implement image and k8s upgrades * terraform-provider: fix linter checks * terraform-provider: refactor to bundle init & upgrade method * constellation-lib: rewrite Kubeconfig endpoint in init * terraform-provider: bind logger and dialer constructors to struct * terraform-provider: move applier to function pointer * terraform-provider: gcp conversion fixes Signed-off-by: Moritz Sanft <58110325+msanft@users.noreply.github.com> * terraform-provider: fix Azure UAMI input * terraform-provider: rename Kubeconfig variable * terraform-provider: tidy * terraform-provider: regenerate docs * constellation-lib: provide Kubeconfig in testing initserver --------- Signed-off-by: Moritz Sanft <58110325+msanft@users.noreply.github.com>
35 lines
1.0 KiB
Bash
Executable File
35 lines
1.0 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
if [[ -f ./constellation ]]; then
|
|
echo "constellation CLI is already available."
|
|
exit 0
|
|
fi
|
|
|
|
os=$(uname -s)
|
|
arch=$(uname -m)
|
|
version=$1
|
|
url=""
|
|
|
|
echo "Fetching constellation ${version}"
|
|
|
|
if [[ ${os} == "Darwin" ]]; then
|
|
if [[ ${arch} == "arm64" ]]; then
|
|
url="https://github.com/edgelesssys/constellation/releases/${version}/download/constellation-darwin-arm64"
|
|
elif [[ ${arch} == "x86_64" ]]; then
|
|
url="https://github.com/edgelesssys/constellation/releases/${version}/download/constellation-darwin-amd64"
|
|
fi
|
|
elif [[ ${os} == "Linux" ]]; then
|
|
if [[ ${arch} == "x86_64" ]]; then
|
|
url="https://github.com/edgelesssys/constellation/releases/${version}/download/constellation-linux-amd64"
|
|
elif [[ ${arch} == "arm64" ]]; then
|
|
url="https://github.com/edgelesssys/constellation/releases/${version}/download/constellation-linux-arm64"
|
|
fi
|
|
fi
|
|
|
|
if [[ -z ${url} ]]; then
|
|
echo "os \"${os}\" and/or architecture \"${arch}\" is not supported."
|
|
exit 1
|
|
else
|
|
curl -o constellation -L "${url}"
|
|
chmod +x constellation
|
|
fi
|