-
Notifications
You must be signed in to change notification settings - Fork 47
/
makefile
47 lines (36 loc) · 1.44 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
ROOT_DIR := $(dir $(realpath $(lastword $(MAKEFILE_LIST))))
VOLUMES := -v $(ROOT_DIR):/src
# renovate: datasource=docker depName=klakegg/hugo
HUGO_VERSION := 0.107.0
IMAGE := klakegg/hugo:$(HUGO_VERSION)-ext
PORT := 1314
DOCKER_CMD := docker run --rm -t -e HUGO_CACHEDIR=/src/tmp/.hugo -e HUGOxPARAMSxGITHUB_REPO=""
.PHONY: build server clean shell
build:
$(DOCKER_CMD) $(VOLUMES) $(IMAGE) -D -v
shell:
$(DOCKER_CMD) -i $(VOLUMES) $(IMAGE) shell
server:
$(DOCKER_CMD) $(VOLUMES) -p $(PORT):$(PORT) $(IMAGE) server -D -p $(PORT) --disableFastRender
clean:
$(DOCKER_CMD) $(VOLUMES) $(IMAGE) --cleanDestinationDir
.PHONY: htmltest
# renovate: datasource=docker depName=wjdp/htmltest
HTMLTEST_VERSION := v0.17.0
htmltest: build
$(DOCKER_CMD) -v $(ROOT_DIR):/test wjdp/htmltest:$(HTMLTEST_VERSION) -c .htmltest.yml public
.PHONY: lint lint-fix
lint: markdownlint
lint: lint-fix
# Markdown lint configuration
#
# - .markdownlintignore holds the configuration for files to be ignored
# - .markdownlint.yaml contains the rules for markdownfiles
# renovate: datasource=docker depName=davidanson/markdownlint-cli2-rules
MDL_DOCKER_VERSION := next
MDL_CMD := docker run -v $(ROOT_DIR):/workdir --rm
.PHONY: markdownlint markdownlint-fix
markdownlint:
$(MDL_CMD) davidanson/markdownlint-cli2-rules:$(MDL_DOCKER_VERSION) "**/*.md"
markdownlint-fix:
$(MDL_CMD) --entrypoint="markdownlint-cli2-fix" davidanson/markdownlint-cli2-rules:$(MDL_DOCKER_VERSION) "**/*.md"