Skip to content

Commit

Permalink
chore: Add helm install script
Browse files Browse the repository at this point in the history
Signed-off-by: Schubert Anselme <[email protected]>
  • Loading branch information
sanselme committed Nov 3, 2024
1 parent d06225d commit bc978b1
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions scripts/install/helm.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#!/bin/bash
# SPDX-License-Identifier: GPL-3.0
# source scripts/alias.sh
source scripts/environment.sh

export $(yq --output-format shell '
.binaries[] |
select(.name == "helm")
' config/versions.yaml | tr -d "'")

export os="$(uname | tr '[:upper:]' '[:lower:]')"
export arch="$(uname -m)"

archs=($(get_env_var "arch_"))
url="$(printf ${url} | envsubst)"

[[ DEBUG -eq 1 ]] && echo """
os: ${os}
arch: ${arch}
url: ${url}
version: ${version}
support: ${archs[*]}
"""

# install helm
if [[ "${archs[@]}" =~ "${arch}" ]]; then
echo curl -fsSLo /tmp/helm.tgz "${url}"
echo tar -xzf /tmp/helm.tgz
echo install "/tmp/${os}-${arch}/helm /usr/local/bin/helm"
echo helm version
else
echo "unsupported architecture"
fi

0 comments on commit bc978b1

Please sign in to comment.