-
Notifications
You must be signed in to change notification settings - Fork 61
/
Makefile
73 lines (59 loc) · 1.55 KB
/
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
HUGO_VERSION ?= 0.68.3
# Run podman with CONTAINER_RUNTIME=podman on the commandline
CONTAINER_RUNTIME ?= docker
setup:
pipenv install --dev
npm install
serve:
HIDE_RELEASES=true bash run.sh \
--buildDrafts \
--buildFuture \
--disableFastRender \
--ignoreCache \
--noHTTPCache
serve-with-releases:
bash run.sh \
--buildDrafts \
--buildFuture \
--disableFastRender
production-build: ci-check-links
hugo \
--gc \
--ignoreCache
preview-build: ci-check-links
hugo \
--gc \
--ignoreCache \
--baseURL $(DEPLOY_PRIME_URL)
docker-build:
$(CONTAINER_RUNTIME) build . \
--rm \
-t spiffe.io:latest \
-f Dockerfile.dev
docker-serve: docker-build
$(CONTAINER_RUNTIME) run --rm -it \
-v $(PWD):/app \
-p 1313:1313 \
-e HIDE_RELEASES=true \
spiffe.io:latest
docker-serve-with-releases: docker-build
$(CONTAINER_RUNTIME) run --rm -it \
-v $(PWD):/app \
-p 1313:1313 \
spiffe.io:latest
pull-external-content:
python ./pull_external.py
ci-check-links: pull-external-content
echo "Running Hugo server..." && \
hugo server -p 1212 & \
sleep 2 && \
echo "Running links checker..." && \
linkchecker -f linkcheckerrc http://localhost:1212; \
echo "Stopping Hugo server..." && \
pkill hugo
check-links:
pipenv run linkchecker -f linkcheckerrc http://localhost:1313
docker-check-links-build:
$(CONTAINER_RUNTIME) build -f Dockerfile.linkchecker -t linkchecker .
docker-check-links: docker-check-links-build
$(CONTAINER_RUNTIME) run --rm -it -u $(shell id -u):$(shell id -g) --net host linkchecker -f linkcheckerrc http://localhost:1313