-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
45 lines (35 loc) · 1.07 KB
/
Makefile
File metadata and controls
45 lines (35 loc) · 1.07 KB
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
BINARY = bin/pgdoc-converter
SRC_DIR ?= /doc-source
OUT_DIR ?= ./docs
MKDOCS ?= ./mkdocs.yml
VERSION ?= ""
COPYRIGHT ?= ""
PGADMIN_SRC ?= ""
SKIP_SECTIONS ?= ""
.PHONY: build test lint clean convert convert-rst convert-md validate setup
setup:
@git config core.hooksPath .githooks
build: setup
cd builder && go build -o ../$(BINARY) .
test: setup
cd builder && go test ./... -v
lint: setup
cd builder && test -z "$$(gofmt -l .)" || (gofmt -d . && exit 1) && go vet ./...
clean: setup
rm -f $(BINARY)
convert: build
./$(BINARY) -src $(SRC_DIR) -out $(OUT_DIR) \
-mkdocs $(MKDOCS) -version $(VERSION) -verbose
convert-rst: build
./$(BINARY) -mode rst -src $(SRC_DIR) -out $(OUT_DIR) \
-mkdocs $(MKDOCS) -version $(VERSION) \
-copyright $(COPYRIGHT) \
-pgadmin-src $(PGADMIN_SRC) \
-skip-sections $(SKIP_SECTIONS) -verbose
convert-md: build
./$(BINARY) -mode md -src $(SRC_DIR) -out $(OUT_DIR) \
-mkdocs $(MKDOCS) -version $(VERSION) -verbose
validate: build
./$(BINARY) -src $(SRC_DIR) -out $(OUT_DIR) \
-mkdocs $(MKDOCS) -version $(VERSION) \
-validate -verbose