Skip to content
This repository was archived by the owner on Nov 23, 2024. It is now read-only.

Commit eb8bbfe

Browse files
authored
Added wrapper support for diff and lint.
1 parent 7ca3450 commit eb8bbfe

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

wrapper.sh

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#!/usr/bin/env bash
22

33
set -ueo pipefail
4+
shopt -s extglob
45

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

19+
# constants
20+
SUPPORTED_COMMANDS="@(install|upgrade|rollback|template|diff|lint)"
21+
1822
# set your own options
1923
: ${DECRYPT_CHARTS:=false}
2024
: ${BUILD_DEPS_AND_PACKAGE:=true}
@@ -80,7 +84,7 @@ decrypt_helm_vars() {
8084

8185
function cleanup {
8286
case "${CURRENT_COMMAND}" in
83-
install|upgrade|rollback|template)
87+
$SUPPORTED_COMMANDS)
8488
echo -e "${YELLOW}>>>>>>${NOC} ${BLUE}Cleanup${NOC}"
8589
for file in "${@}";
8690
do
@@ -109,7 +113,7 @@ function helm_cmd {
109113
}
110114

111115
case "${CURRENT_COMMAND}" in
112-
install|upgrade|rollback|template)
116+
$SUPPORTED_COMMANDS)
113117
for file in "$@"
114118
do
115119
decrypt_helm_vars "$file"

0 commit comments

Comments
 (0)