Build: Introduce shellcheck (#18081)

* Build: introduce shellcheck

Fixes #16198

(cherry picked from commit 4b16cd6cc8)
This commit is contained in:
Oleg Gaidarenko
2019-08-02 11:47:05 +02:00
committed by Leonard Gram
parent 00519f1105
commit fd7c38c62f
27 changed files with 157 additions and 150 deletions
+5 -12
View File
@@ -1,17 +1,10 @@
#!/bin/bash
function exit_if_fail {
command=$@
echo "Executing '$command'"
eval $command
rc=$?
if [ $rc -ne 0 ]; then
echo "'$command' returned $rc."
exit $rc
fi
}
# shellcheck source=./scripts/helpers/exit-if-fail.sh
source "$(dirname "$0")/helpers/exit-if-fail.sh"
export GRAFANA_TEST_DB=postgres
time for d in $(go list ./pkg/...); do
exit_if_fail go test -tags=integration $d
done
exit_if_fail go test -tags=integration "$d"
done