Merge pull request #21782 from sftim/20200614_warn_if_submodules_not_initialized

Warn from make if submodules are not initialized
This commit is contained in:
Kubernetes Prow Robot
2020-06-29 11:47:59 -07:00
committed by GitHub
+8 -6
View File
@@ -17,12 +17,15 @@ CCEND=\033[0m
help: ## Show this help.
@awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z_-]+:.*?## / {sub("\\\\n",sprintf("\n%22c"," "), $$2);printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST)
module-check:
@git submodule status --recursive | awk '/^[+-]/ {printf "\033[31mWARNING\033[0m Submodule not initialized: \033[34m%s\033[0m\n",$$2}' 1>&2
all: build ## Build site with production settings and put deliverables in ./public
build: ## Build site with production settings and put deliverables in ./public
build: module-check ## Build site with production settings and put deliverables in ./public
hugo --minify
build-preview: ## Build site with drafts and future posts enabled
build-preview: module-check ## Build site with drafts and future posts enabled
hugo --buildDrafts --buildFuture
deploy-preview: ## Deploy preview site via netlify
@@ -39,7 +42,7 @@ production-build: build check-headers-file ## Build the production site and ensu
non-production-build: ## Build the non-production site, which adds noindex headers to prevent indexing
hugo --enableGitInfo
serve: ## Boot the development server.
serve: module-check ## Boot the development server.
hugo server --buildFuture
docker-image:
@@ -60,10 +63,10 @@ container-image:
--tag $(CONTAINER_IMAGE) \
--build-arg HUGO_VERSION=$(HUGO_VERSION)
container-build:
container-build: module-check
$(CONTAINER_RUN) $(CONTAINER_IMAGE) hugo
container-serve:
container-serve: module-check
$(CONTAINER_RUN) --mount type=tmpfs,destination=/src/resources,tmpfs-mode=0755 -p 1313:1313 $(CONTAINER_IMAGE) hugo server --buildFuture --bind 0.0.0.0
test-examples:
@@ -81,4 +84,3 @@ docker-internal-linkcheck:
container-internal-linkcheck: link-checker-image-pull
$(CONTAINER_RUN) $(CONTAINER_IMAGE) hugo --config config.toml,linkcheck-config.toml --buildFuture
$(CONTAINER_ENGINE) run --mount type=bind,source=$(CURDIR),target=/test --rm wjdp/htmltest htmltest