Skip to content

Commit 8bfff39

Browse files
authored
chore: update dependencies (#160)
* Update kube-linter from 0.2.2 to 0.2.5 * Add gotestsum to summarize test output * Add golangci-lint to lint test code
1 parent 2844271 commit 8bfff39

File tree

1 file changed

+27
-9
lines changed

1 file changed

+27
-9
lines changed

scripts/install_deps.sh

Lines changed: 27 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ set -euo pipefail
66
cd "$(dirname "$0")"
77
source "./lib.sh"
88

9-
TMPDIR="$(mktemp -d)"
9+
TMPDIR=$(mktemp -d)
1010
BINDIR="/usr/local/bin"
1111

1212
curl_flags=(
@@ -18,22 +18,40 @@ curl_flags=(
1818
run_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

3046
run_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

3755
run_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

Comments
 (0)