mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 03:41:45 +00:00
Make builds fail if go2make misbehaves
Rather than an obscure error.
This commit is contained in:
parent
50e07c9a12
commit
56ad63913a
@ -61,7 +61,7 @@ GO_PKGDEPS_FILE = go-pkgdeps.mk
|
||||
# Include the Go package dependencies file. This will cause the rule of
|
||||
# the same name to be considered and if it is updated, make will restart and
|
||||
# reload the updated deps.
|
||||
sinclude $(META_DIR)/$(GO_PKGDEPS_FILE)
|
||||
include $(META_DIR)/$(GO_PKGDEPS_FILE)
|
||||
|
||||
# Only build and run go2make on the first pass. If that generates a new
|
||||
# GO_PKGDEPS_FILE, make will restart the whole process and set MAKE_RESTARTS to
|
||||
@ -83,11 +83,17 @@ $(META_DIR)/$(GO_PKGDEPS_FILE): FORCE
|
||||
--prune k8s.io/kubernetes/vendor \
|
||||
k8s.io/kubernetes/vendor/k8s.io/... \
|
||||
> $@.tmp
|
||||
if [[ -s $@.tmp ]]; then \
|
||||
if ! cmp -s $@.tmp $@; then \
|
||||
if [[ "$(DBG_CODEGEN)" == 1 ]]; then \
|
||||
echo "DBG: $(GO_PKGDEPS_FILE) changed"; \
|
||||
fi; \
|
||||
cat $@.tmp > $@; \
|
||||
fi \
|
||||
else \
|
||||
kube::log::error "go2make produced no results"; \
|
||||
rm -f $@; \
|
||||
false; \
|
||||
fi
|
||||
rm -f $@.tmp
|
||||
endif # MAKE_RESTARTS
|
||||
|
Loading…
Reference in New Issue
Block a user