Skip to content

Commit

Permalink
#636 Helm integration
Browse files Browse the repository at this point in the history
#636 Helm integration replace commandlet
  • Loading branch information
CREITZ25 committed Mar 21, 2022
1 parent bf37a8c commit 57567ba
Showing 1 changed file with 7 additions and 24 deletions.
31 changes: 7 additions & 24 deletions scripts/src/main/resources/scripts/command/helm
Original file line number Diff line number Diff line change
Expand Up @@ -14,37 +14,21 @@ if [ -n "${DEVON_IDE_TRACE}" ]; then set -vx; fi
# shellcheck source=scripts/functions
source "$(dirname "${0}")"/../functions

# Check if helm is installed.
function doIsHelmInstalled() {
if command -v helm &> /dev/null
then
return
else
return 255
fi
}

# Call helm with specified arguments.
function doRun() {
doSetup silent
helm "${@}"
doRunCommand "${HELM_HOME}/helm ${@}"
}

function doSetup() {

if doIsHelmInstalled
# Check if HELM_HOME is already set
if [ -z "${HELM_HOME}" ]
then
if [ "${1}" != "silent" ] && ! doIsQuiet
then
helm version
fi
else
# Check if HELM_HOME is already set
if [ -z "${HELM_HOME}" ]
then
HELM_HOME="${DEVON_IDE_HOME}/software/helm"
fi
HELMFORM_HOME="${DEVON_IDE_HOME}/software/helm"
fi

if [ ! -d ${HELM_HOME} ] || [ "${1}" != "silent" ]
then
# Get leatest release
if [ -z "${HELM_VERSION}" ]
then
Expand All @@ -56,7 +40,6 @@ function doSetup() {
fi
}


# CLI
case ${1} in
"help" | "-h")
Expand Down

0 comments on commit 57567ba

Please sign in to comment.