Make hack scripts use go install and assume PATH
Now that they all call setup_env, we don't need find-binary (I think). That was originally meant to hide the diff between docker and local builds but all these tools do local builds anyway.
This commit is contained in:
@@ -28,12 +28,7 @@ source "${KUBE_ROOT}/hack/lib/util.sh"
|
||||
|
||||
kube::golang::setup_env
|
||||
|
||||
make -C "${KUBE_ROOT}" WHAT=cmd/genswaggertypedocs
|
||||
|
||||
# Find binary
|
||||
genswaggertypedocs=$(kube::util::find-binary "genswaggertypedocs")
|
||||
|
||||
result=0
|
||||
GOPROXY=off go install ./cmd/genswaggertypedocs
|
||||
|
||||
find_files() {
|
||||
find . -not \( \
|
||||
@@ -69,10 +64,11 @@ kube::util::check-file-in-alphabetical-order "${failure_file}"
|
||||
failing_files=()
|
||||
while IFS='' read -r line; do failing_files+=("$line"); done < <(cat "$failure_file")
|
||||
|
||||
result=0
|
||||
for file in $versioned_api_files; do
|
||||
if ! kube::util::array_contains "$file" "${failing_files[@]}"; then
|
||||
gen_swagger_result=0
|
||||
$genswaggertypedocs -v -s "${file}" -f - || gen_swagger_result=$?
|
||||
genswaggertypedocs -v -s "${file}" -f - || gen_swagger_result=$?
|
||||
if [[ "${gen_swagger_result}" -ne 0 ]]; then
|
||||
echo "API file: ${file} is missing: ${gen_swagger_result} descriptions"
|
||||
result=1
|
||||
|
||||
Reference in New Issue
Block a user