@@ -175,6 +175,11 @@ GOVULNCHECK_VER := v1.0.0
175
175
GOVULNCHECK := $(abspath $(TOOLS_BIN_DIR ) /$(GOVULNCHECK_BIN ) -$(GOVULNCHECK_VER ) )
176
176
GOVULNCHECK_PKG := golang.org/x/vuln/cmd/govulncheck
177
177
178
+ IMPORT_BOSS_BIN := import-boss
179
+ IMPORT_BOSS_VER := v0.28.1
180
+ IMPORT_BOSS := $(abspath $(TOOLS_BIN_DIR ) /$(IMPORT_BOSS_BIN ) )
181
+ IMPORT_BOSS_PKG := k8s.io/code-generator/cmd/import-boss
182
+
178
183
CONVERSION_VERIFIER_BIN := conversion-verifier
179
184
CONVERSION_VERIFIER := $(abspath $(TOOLS_BIN_DIR ) /$(CONVERSION_VERIFIER_BIN ) )
180
185
@@ -607,7 +612,7 @@ APIDIFF_OLD_COMMIT ?= $(shell git rev-parse origin/main)
607
612
apidiff : $(GO_APIDIFF ) # # Check for API differences
608
613
$(GO_APIDIFF ) $(APIDIFF_OLD_COMMIT ) --print-compatible
609
614
610
- ALL_VERIFY_CHECKS = licenses boilerplate shellcheck tiltfile modules gen conversions doctoc capi-book-summary diagrams
615
+ ALL_VERIFY_CHECKS = licenses boilerplate shellcheck tiltfile modules gen conversions doctoc capi-book-summary diagrams import-restrictions
611
616
612
617
.PHONY : verify
613
618
verify : $(addprefix verify-,$(ALL_VERIFY_CHECKS ) ) lint-dockerfiles # # Run all verify-* targets
@@ -690,6 +695,10 @@ verify-security: ## Verify code and images for vulnerabilities
690
695
exit 1; \
691
696
fi
692
697
698
+ .PHONY : verify-import-restrictions
699
+ verify-import-restrictions : $(IMPORT_BOSS ) # # Verify import restrictions with import-boss
700
+ ./hack/verify-import-restrictions.sh
701
+
693
702
# # --------------------------------------
694
703
# # Binaries
695
704
# # --------------------------------------
@@ -1305,6 +1314,9 @@ $(GOLANGCI_LINT_BIN): $(GOLANGCI_LINT) ## Build a local copy of golangci-lint.
1305
1314
.PHONY : $(GOVULNCHECK_BIN )
1306
1315
$(GOVULNCHECK_BIN ) : $(GOVULNCHECK ) # # Build a local copy of govulncheck.
1307
1316
1317
+ .PHONY : $(IMPORT_BOSS_BIN )
1318
+ $(IMPORT_BOSS_BIN ) : $(IMPORT_BOSS )
1319
+
1308
1320
$(CONTROLLER_GEN ) : # Build controller-gen from tools folder.
1309
1321
GOBIN=$(TOOLS_BIN_DIR ) $(GO_INSTALL ) $(CONTROLLER_GEN_PKG ) $(CONTROLLER_GEN_BIN ) $(CONTROLLER_GEN_VER )
1310
1322
@@ -1359,6 +1371,9 @@ $(GOLANGCI_LINT): # Build golangci-lint from tools folder.
1359
1371
$(GOVULNCHECK ) : # Build govulncheck.
1360
1372
GOBIN=$(TOOLS_BIN_DIR ) $(GO_INSTALL ) $(GOVULNCHECK_PKG ) $(GOVULNCHECK_BIN ) $(GOVULNCHECK_VER )
1361
1373
1374
+ $(IMPORT_BOSS ) : # Build import-boss
1375
+ GOBIN=$(TOOLS_BIN_DIR ) $(GO_INSTALL ) $(IMPORT_BOSS_PKG ) $(IMPORT_BOSS_BIN ) $(IMPORT_BOSS_VER )
1376
+
1362
1377
# # --------------------------------------
1363
1378
# # Helpers
1364
1379
# # --------------------------------------
0 commit comments