mirror of
https://github.com/kubernetes-sigs/kind.git
synced 2025-12-01 07:26:05 +07:00
fix generate scripts
This commit is contained in:
@@ -26,6 +26,6 @@ GOBIN="${OUTPUT_GOBIN}" go install ./vendor/github.com/jteeuwen/go-bindata/go-bi
|
||||
|
||||
# go generate (using go-bindata)
|
||||
# NOTE: go will only take package paths, not absolute directories
|
||||
PATH="${OUTPUT_GOBIN}:${PATH}" go generate ./kind/...
|
||||
PATH="${OUTPUT_GOBIN}:${PATH}" go generate ./...
|
||||
# gofmt the generated file
|
||||
find ./kind -name "*.go" -type f -print0 | xargs -0 gofmt -s -w
|
||||
|
||||
@@ -22,15 +22,15 @@ set -o xtrace
|
||||
REPO_ROOT=$(git rev-parse --show-toplevel)
|
||||
cd "${REPO_ROOT}"
|
||||
|
||||
bazel build //kind/pkg/build/sources:bindata
|
||||
bazel build //pkg/build/sources:bindata
|
||||
|
||||
BAZEL_GENERATED_BINDATA="bazel-genfiles/kind/pkg/build/sources/images_sources.go"
|
||||
GO_GENERATED_BINDATA="kind/pkg/build/sources/images_sources.go"
|
||||
BAZEL_GENERATED_BINDATA="bazel-genfiles/pkg/build/sources/images_sources.go"
|
||||
GO_GENERATED_BINDATA="pkg/build/sources/images_sources.go"
|
||||
|
||||
DIFF="$(diff <(cat "${GO_GENERATED_BINDATA}") <(gofmt -s "${BAZEL_GENERATED_BINDATA}"))"
|
||||
if [ ! -z "$DIFF" ]; then
|
||||
echo "${GO_GENERATED_BINDATA} does not match ${BAZEL_GENERATED_BINDATA}"
|
||||
echo "please run and commit: kind/hack/generate.sh"
|
||||
echo "please run and commit: hack/generate.sh"
|
||||
echo "if you have changed the generation, please ensure these remain identical"
|
||||
echo "see: hack/bindata.bzl, pkg/build/sources/BUILD.bazel, pkg/build/sources/generate.go"
|
||||
exit 1
|
||||
|
||||
Reference in New Issue
Block a user