@@ -17,12 +17,15 @@ CCEND=\033[0m
17
17
help : # # Show this help.
18
18
@awk ' BEGIN {FS = ":.*?## "} /^[a-zA-Z_-]+:.*?## / {sub("\\\\n",sprintf("\n%22c"," "), $$2);printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST )
19
19
20
+ module-check :
21
+ @git submodule status --recursive | awk ' /^[+-]/ {printf "\033[31mWARNING\033[0m Submodule not initialized: \033[34m%s\033[0m\n",$$2}' 1>&2
22
+
20
23
all : build # # Build site with production settings and put deliverables in ./public
21
24
22
- build : # # Build site with production settings and put deliverables in ./public
25
+ build : module-check # # Build site with production settings and put deliverables in ./public
23
26
hugo --minify
24
27
25
- build-preview : # # Build site with drafts and future posts enabled
28
+ build-preview : module-check # # Build site with drafts and future posts enabled
26
29
hugo --buildDrafts --buildFuture
27
30
28
31
deploy-preview : # # Deploy preview site via netlify
@@ -39,7 +42,7 @@ production-build: build check-headers-file ## Build the production site and ensu
39
42
non-production-build : # # Build the non-production site, which adds noindex headers to prevent indexing
40
43
hugo --enableGitInfo
41
44
42
- serve : # # Boot the development server.
45
+ serve : module-check # # Boot the development server.
43
46
hugo server --buildFuture
44
47
45
48
docker-image :
@@ -60,10 +63,10 @@ container-image:
60
63
--tag $(CONTAINER_IMAGE ) \
61
64
--build-arg HUGO_VERSION=$(HUGO_VERSION )
62
65
63
- container-build :
66
+ container-build : module-check
64
67
$(CONTAINER_RUN ) $(CONTAINER_IMAGE ) hugo
65
68
66
- container-serve :
69
+ container-serve : module-check
67
70
$(CONTAINER_RUN ) --mount type=tmpfs,destination=/src/resources,tmpfs-mode=0755 -p 1313:1313 $(CONTAINER_IMAGE ) hugo server --buildFuture --bind 0.0.0.0
68
71
69
72
test-examples :
@@ -81,4 +84,3 @@ docker-internal-linkcheck:
81
84
container-internal-linkcheck : link-checker-image-pull
82
85
$(CONTAINER_RUN ) $(CONTAINER_IMAGE ) hugo --config config.toml,linkcheck-config.toml --buildFuture
83
86
$(CONTAINER_ENGINE ) run --mount type=bind,source=$(CURDIR ) ,target=/test --rm wjdp/htmltest htmltest
84
-
0 commit comments