Fix hack/verify-description.sh to actually surface the error

pull/6/head
Yu-Ju Hong 2015-02-18 12:56:46 -08:00
parent e045b19bec
commit 69318a118c
1 changed files with 4 additions and 1 deletions

View File

@ -37,7 +37,10 @@ find_files() {
\) -name '*.go'
}
find_files | egrep "pkg/api/v.[^/]*/types\.go" | grep -v v1beta3 | while read file ; do
files=`find_files | egrep "pkg/api/v.[^/]*/types\.go" | grep -v v1beta3`
for file in $files
do
if [[ "$("${KUBE_ROOT}/hooks/description.sh" "${file}")" -eq "0" ]]; then
echo "API file is missing the required field descriptions: ${file}"
result=1