@@ -46,6 +46,8 @@ E2E_FRAMEWORK_DIR := test/framework
4646CAPD_DIR := test/infrastructure/docker
4747RELEASE_NOTES_BIN := bin/release-notes
4848RELEASE_NOTES := $(TOOLS_DIR ) /$(RELEASE_NOTES_BIN )
49+ LINK_CHECKER_BIN := bin/liche
50+ LINK_CHECKER := $(TOOLS_DIR ) /$(LINK_CHECKER_BIN )
4951
5052# Binaries.
5153# Need to use abspath so we can invoke these from subdirectories
@@ -170,6 +172,9 @@ $(GOBINDATA): $(TOOLS_DIR)/go.mod # Build go-bindata from tools folder.
170172$(RELEASE_NOTES ) : $(TOOLS_DIR ) /go.mod
171173 cd $(TOOLS_DIR ) && go build -tags=tools -o $(RELEASE_NOTES_BIN ) ./release
172174
175+ $(LINK_CHECKER ) : $(TOOLS_DIR ) /go.mod
176+ cd $(TOOLS_DIR ) && go build -tags=tools -o $(LINK_CHECKER_BIN ) github.com/raviqqe/liche
177+
173178.PHONY : e2e-framework
174179e2e-framework : # # Builds the CAPI e2e framework
175180 cd $(E2E_FRAMEWORK_DIR ) ; go build ./...
@@ -521,6 +526,7 @@ verify:
521526 ./hack/verify-doctoc.sh
522527 ./hack/verify-shellcheck.sh
523528 ./hack/verify-starlark.sh
529+ $(MAKE ) verify-book-links
524530 $(MAKE ) verify-modules
525531 $(MAKE ) verify-gen
526532 $(MAKE ) verify-docker-provider
@@ -544,6 +550,10 @@ verify-docker-provider:
544550 @echo " Verifying CAPD"
545551 cd $(CAPD_DIR ) ; $(MAKE ) verify
546552
553+ .PHONY : verify-book-links
554+ verify-book-links : $(LINK_CHECKER )
555+ # Ignore localhost links and set concurrency to a reasonable number
556+ $(LINK_CHECKER ) -r docs/book -x " ^https?://localhost($|[:/].*)" -c 10
547557# # --------------------------------------
548558# # Others / Utilities
549559# # --------------------------------------
0 commit comments