forked from mstrzele/helm-edit
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.sh
More file actions
executable file
·26 lines (22 loc) · 907 Bytes
/
install.sh
File metadata and controls
executable file
·26 lines (22 loc) · 907 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/usr/bin/env bash
set -euf -o pipefail
DEFAULT_VERSION="0.6.0+qlever"
if [[ $(helm version --short | head -c2) == "v2" ]]; then
echo "This plugin version support only Helm 3. Defaulting to previous version"
DEFAULT_VERSION="0.3.0"
fi
HELM_EDIT_VERSION=${HELM_EDIT_VERSION:-"${DEFAULT_VERSION}"}
file="${HELM_PLUGIN_DIR:-"$(helm home)/plugins/helm-edit"}/helm-edit"
os=$(uname -s | tr '[:upper:]' '[:lower:]')
# FIXME: automatically use releases from current repo?
#url="https://github.com/mstrzele/helm-edit/releases/download/v${HELM_EDIT_VERSION}/helm-edit_${os}_amd64"
url="https://github.com/qlever-llc/helm-edit/releases/download/v${HELM_EDIT_VERSION}/helm-edit_${os}_amd64"
if command -v go; then
cd "${HELM_PLUGIN_DIR}" && go build
#cp helm-edit "${file}"
elif command -v wget; then
wget -O "${file}" "${url}"
elif command -v curl; then
curl -o "${file}" -L "${url}"
fi
chmod +x "${file}"