...
1#!/bin/bash
2
3set -e
4
5RED='\033[0;31m'
6GREEN='\033[0;32m'
7RESET='\033[0m'
8
9if ! [ -x "$(command -v goimports)" ]; then
10 echo "Installing goimports"
11 go get golang.org/x/tools/cmd/goimports
12fi
13
14echo "Running validation scripts..."
15
16scripts=(
17)
18fail=0
19for s in "${scripts[@]}"; do
20 echo "RUN ${s}"
21 set +e
22 $s
23 result=$?
24 set -e
25 if [[ $result -eq 0 ]]; then
26 echo -e "${GREEN}PASSED${RESET} ${s}"
27 else
28 echo -e "${RED}FAILED${RESET} ${s}"
29 fail=1
30 fi
31done
32exit $fail
View as plain text