Skip to content
This repository has been archived by the owner on Jun 2, 2022. It is now read-only.

Commit

Permalink
Merge pull request #41 from lbogdan/feature/wrapper-diff-lint
Browse files Browse the repository at this point in the history
Add wrapper support for diff and lint
  • Loading branch information
szibis authored Mar 24, 2018
2 parents 1c182c2 + eb8bbfe commit 38d305d
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions wrapper.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/usr/bin/env bash

set -ueo pipefail
shopt -s extglob

# Redirect fds so that output to &3 is real stdout, and &1 goes to stderr
# instead; this prevents accidentially intermixing with what helm sends to
Expand All @@ -15,6 +16,9 @@ BLUE='\033[0;34m'
YELLOW='\033[1;33m'
NOC='\033[0m'

# constants
SUPPORTED_COMMANDS="@(install|upgrade|rollback|template|diff|lint)"

# set your own options
: ${DECRYPT_CHARTS:=false}
: ${BUILD_DEPS_AND_PACKAGE:=true}
Expand Down Expand Up @@ -80,7 +84,7 @@ decrypt_helm_vars() {

function cleanup {
case "${CURRENT_COMMAND}" in
install|upgrade|rollback|template)
$SUPPORTED_COMMANDS)
echo -e "${YELLOW}>>>>>>${NOC} ${BLUE}Cleanup${NOC}"
for file in "${@}";
do
Expand Down Expand Up @@ -109,7 +113,7 @@ function helm_cmd {
}

case "${CURRENT_COMMAND}" in
install|upgrade|rollback|template)
$SUPPORTED_COMMANDS)
for file in "$@"
do
decrypt_helm_vars "$file"
Expand Down

0 comments on commit 38d305d

Please sign in to comment.