@@ -6,7 +6,7 @@ set -euo pipefail
66cd " $( dirname " $0 " ) "
77source " ./lib.sh"
88
9- TMPDIR=" $( mktemp -d) "
9+ TMPDIR=$( mktemp -d)
1010BINDIR=" /usr/local/bin"
1111
1212curl_flags=(
@@ -18,22 +18,40 @@ curl_flags=(
1818run_trace false sudo apt-get install --no-install-recommends --yes \
1919 shellcheck
2020
21- run_trace false curl " ${curl_flags[@]} " " https://get.helm.sh/helm-v3.7.1-linux-amd64.tar.gz" \| \
22- tar -C " $TMPDIR " --strip-components=1 -zxf - linux-amd64/helm
21+ # gotestsum makes test output more readable
22+ GOTESTSUM_VERSION=1.7.0
23+ run_trace false curl " ${curl_flags[@]} " " https://github.com/gotestyourself/gotestsum/releases/download/v${GOTESTSUM_VERSION} /gotestsum_${GOTESTSUM_VERSION} _linux_amd64.tar.gz" \| \
24+ tar --extract --gzip --directory=" $TMPDIR " --file=- gotestsum
2325
24- run_trace false curl " ${curl_flags[@]} " " https://github.com/norwoodj/helm-docs/releases/download/v1.5.0/helm-docs_1.5.0_Linux_x86_64.tar.gz" \| \
25- tar -C " $TMPDIR " -zxf - helm-docs
26+ # golangci-lint to lint Go code with multiple tools
27+ GOLANGCI_LINT_VERSION=1.43.0
28+ run_trace false curl " ${curl_flags[@]} " " https://github.com/golangci/golangci-lint/releases/download/v${GOLANGCI_LINT_VERSION} /golangci-lint-${GOLANGCI_LINT_VERSION} -linux-amd64.tar.gz" \| \
29+ tar --extract --gzip --directory=" $TMPDIR " --file=- --strip-components=1 " golangci-lint-${GOLANGCI_LINT_VERSION} -linux-amd64/golangci-lint"
2630
27- run_trace false curl " ${curl_flags[@]} " " https://github.com/stackrox/kube-linter/releases/download/0.2.2/kube-linter-linux.tar.gz" \| \
28- tar -C " $TMPDIR " -zxf - kube-linter
31+ # Helm for packaging and validating chart
32+ HELM_VERSION=3.7.1
33+ run_trace false curl " ${curl_flags[@]} " " https://get.helm.sh/helm-v${HELM_VERSION} -linux-amd64.tar.gz" \| \
34+ tar --extract --gzip --directory=" $TMPDIR " --file=- --strip-components=1 linux-amd64/helm
35+
36+ # helm-docs for generating README.md
37+ HELM_DOCS_VERSION=1.5.0
38+ run_trace false curl " ${curl_flags[@]} " " https://github.com/norwoodj/helm-docs/releases/download/v${HELM_DOCS_VERSION} /helm-docs_${HELM_DOCS_VERSION} _Linux_x86_64.tar.gz" \| \
39+ tar --extract --gzip --directory=" $TMPDIR " --file=- helm-docs
40+
41+ # kube-linter for checking generated YAML output
42+ KUBE_LINTER_VERSION=0.2.5
43+ run_trace false curl " ${curl_flags[@]} " " https://github.com/stackrox/kube-linter/releases/download/${KUBE_LINTER_VERSION} /kube-linter-linux.tar.gz" \| \
44+ tar --extract --gzip --directory=" $TMPDIR " --file=- kube-linter
2945
3046run_trace false sudo install --mode=0755 --target-directory=" $BINDIR " " $TMPDIR /*"
3147
32- run_trace false which \
48+ run_trace false command -v \
49+ gotestsum \
50+ golangci-lint \
3351 helm \
3452 helm-docs \
3553 kube-linter
3654
3755run_trace false helm version --short
3856
39- run_trace false rm -vrf " $TMPDIR "
57+ run_trace false rm --verbose --recursive --force " $TMPDIR "
0 commit comments