forked from kubermatic/docs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
30 lines (26 loc) · 963 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
CODESPELL_IMAGE ?= quay.io/kubermatic/codespell:1.17.1
CODESPELL_BIN := $(shell which codespell)
DOCKER_BIN := $(shell which docker)
.PHONY: preview
preview:
docker run -it --name kubermatic-docs --rm \
-p 1313:1313 \
-v `pwd`:/docs quay.io/kubermatic/hugo:0.75.1-0 \
bash -c 'cd /docs; hugo server -D -F --bind 0.0.0.0'
.PHONY: runbook
runbook:
./hack/convert-runbook.sh
.PHONY: spellcheck
spellcheck:
ifndef CODESPELL_BIN
$(error "codespell not available in your environment, use spellcheck-in-docker if you have Docker installed.")
endif
$(CODESPELL_BIN) \
-S ./themes,./static,*.css,swagger*.js,swagger.json,*.scss,*.png,*.po,.git,*.jpg,*.woff,*.woff2,*.xml \
-I ./.codespell.exclude -f
.PHONY: spellcheck-in-docker
spellcheck-in-docker:
ifndef DOCKER_BIN
$(error "Docker not available in your environment, please install it and retry.")
endif
$(DOCKER_BIN) run -it -v ${PWD}:/kubermatic -w /kubermatic $(CODESPELL_IMAGE) make spellcheck