mirror of
https://github.com/optim-enterprises-bv/kubernetes.git
synced 2025-11-03 03:38:15 +00:00
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/fieldnamedocscheck
|
||||
|
||||
# Find binary
|
||||
fieldnamedocscheck=$(kube::util::find-binary "fieldnamedocscheck")
|
||||
|
||||
result=0
|
||||
GOPROXY=off go install ./cmd/fieldnamedocscheck
|
||||
|
||||
find_files() {
|
||||
find . -not \( \
|
||||
@@ -55,10 +50,11 @@ find_files() {
|
||||
|
||||
versioned_api_files=$(find_files) || true
|
||||
|
||||
result=0
|
||||
for file in ${versioned_api_files}; do
|
||||
package="${file%"/types.go"}"
|
||||
echo "Checking ${package}"
|
||||
${fieldnamedocscheck} -s "${file}" || result=$?
|
||||
fieldnamedocscheck -s "${file}" || result=$?
|
||||
done
|
||||
|
||||
exit ${result}
|
||||
|
||||
Reference in New Issue
Block a user