-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
30 lines (21 loc) · 799 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
IMAGE := localhost/elektrubadur-builder:latest
export DOMAIN := elektrubadur.se
export DESTINATION := public
define run
podman run --rm --interactive \
--volume "$(CURDIR):$(CURDIR):z" \
--workdir "$(CURDIR)"
endef
.PHONY: all image build serve validate check_links
all:
make --print-targets
image:
podman build -f build/Containerfile -t $(IMAGE) .
build: image
$(run) --env DOMAIN --env DESTINATION $(IMAGE) bash build/build.sh
serve: image
$(run) --publish '1313:1313' $(IMAGE) hugo serve --bind 0.0.0.0
validate: build
$(run) ghcr.io/validator/validator:latest vnu --skip-non-html --also-check-css --also-check-svg public
check_links:
$(run) docker.io/tennox/linkcheck:latest --show-redirects --check-anchors --skip-file build/linkcheck_skipfile.txt --external "https://$(DOMAIN)"