@@ -26,75 +26,78 @@ cd "${REPO_PATH}"
26
26
failure () {
27
27
if [[ " ${1} " = 1 ]]; then
28
28
res=1
29
- echo " ${2} failed"
29
+ failed+=(" ${2} " )
30
+ outputs+=(" ${3} " )
30
31
fi
31
32
}
32
33
33
34
# exit code, if a script fails we'll set this to 1
34
35
res=0
36
+ failed=()
37
+ outputs=()
35
38
36
39
# run all verify scripts, optionally skipping any of them
37
40
38
41
if [[ " ${VERIFY_WHITESPACE:- true} " == " true" ]]; then
39
42
echo " [*] Verifying whitespace..."
40
- hack/verify-whitespace.sh
41
- failure $? " verify-whitespace.sh"
43
+ out= $( hack/verify-whitespace.sh 2>&1 )
44
+ failure $? " verify-whitespace.sh" " ${out} "
42
45
cd " ${REPO_PATH} "
43
46
fi
44
47
45
48
if [[ " ${VERIFY_SPELLING:- true} " == " true" ]]; then
46
49
echo " [*] Verifying spelling..."
47
- hack/verify-spelling.sh
48
- failure $? " verify-spelling.sh"
50
+ out= $( hack/verify-spelling.sh 2>&1 )
51
+ failure $? " verify-spelling.sh" " ${out} "
49
52
cd " ${REPO_PATH} "
50
53
fi
51
54
52
55
if [[ " ${VERIFY_BOILERPLATE:- true} " == " true" ]]; then
53
56
echo " [*] Verifying boilerplate..."
54
- hack/verify-boilerplate.sh
55
- failure $? " verify-boilerplate.sh"
57
+ out= $( hack/verify-boilerplate.sh 2>&1 )
58
+ failure $? " verify-boilerplate.sh" " ${out} "
56
59
cd " ${REPO_PATH} "
57
60
fi
58
61
59
62
if [[ " ${VERIFY_GOFMT:- true} " == " true" ]]; then
60
63
echo " [*] Verifying gofmt..."
61
- hack/verify-gofmt.sh
62
- failure $? " verify-gofmt.sh"
64
+ out= $( hack/verify-gofmt.sh 2>&1 )
65
+ failure $? " verify-gofmt.sh" " ${out} "
63
66
cd " ${REPO_PATH} "
64
67
fi
65
68
66
69
if [[ " ${VERIFY_GOLINT:- true} " == " true" ]]; then
67
70
echo " [*] Verifying golint..."
68
- hack/verify-golint.sh
69
- failure $? " verify-golint.sh"
71
+ out= $( hack/verify-golint.sh 2>&1 )
72
+ failure $? " verify-golint.sh" " ${out} "
70
73
cd " ${REPO_PATH} "
71
74
fi
72
75
73
76
if [[ " ${VERIFY_GOVET:- true} " == " true" ]]; then
74
77
echo " [*] Verifying govet..."
75
- hack/verify-govet.sh
76
- failure $? " verify-govet.sh"
78
+ out= $( hack/verify-govet.sh 2>&1 )
79
+ failure $? " verify-govet.sh" " ${out} "
77
80
cd " ${REPO_PATH} "
78
81
fi
79
82
80
83
if [[ " ${VERIFY_DEPS:- true} " == " true" ]]; then
81
84
echo " [*] Verifying deps..."
82
- hack/verify-deps.sh
83
- failure $? " verify-deps.sh"
85
+ out= $( hack/verify-deps.sh 2>&1 )
86
+ failure $? " verify-deps.sh" " ${out} "
84
87
cd " ${REPO_PATH} "
85
88
fi
86
89
87
90
if [[ " ${VERIFY_GOTEST:- true} " == " true" ]]; then
88
91
echo " [*] Verifying gotest..."
89
- hack/verify-gotest.sh
90
- failure $? " verify-gotest.sh"
92
+ out= $( hack/verify-gotest.sh 2>&1 )
93
+ failure $? " verify-gotest.sh" " ${out} "
91
94
cd " ${REPO_PATH} "
92
95
fi
93
96
94
97
if [[ " ${VERIFY_BUILD:- true} " == " true" ]]; then
95
98
echo " [*] Verifying build..."
96
- hack/verify-build.sh
97
- failure $? " verify-build.sh"
99
+ out= $( hack/verify-build.sh 2>&1 )
100
+ failure $? " verify-build.sh" " ${out} "
98
101
cd " ${REPO_PATH} "
99
102
fi
100
103
@@ -104,6 +107,11 @@ if [[ "${res}" = 0 ]]; then
104
107
echo " All verify checks passed, congrats!"
105
108
else
106
109
echo " "
107
- echo " One or more verify checks failed! See output above..."
110
+ echo " Some of the verify scripts failed:"
111
+ for i in " ${! failed[@]} " ; do
112
+ echo " - ${failed[$i]} :"
113
+ echo " ${outputs[$i]} "
114
+ echo
115
+ done
108
116
fi
109
117
exit " ${res} "
0 commit comments