-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
84 lines (73 loc) · 1.52 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
74
75
76
77
78
79
80
81
82
83
84
init:
go mod download
go generate ./...
.PHONY: init
build:
echo "Dependencies used: "
go list -m all
echo "Building"
go build -v -o build/clingy
.PHONY: build
docs:
go run *.go run \
-i ./cmd/test_data/01_basic_flow_will_pass.yaml \
-o ./docs/example-outputs/carousel \
-r carousel \
-u False
go run *.go run \
-i ./cmd/test_data/01_basic_flow_will_pass.yaml \
-o ./docs/example-outputs/html-simple \
-u False
go run *.go run \
-i ./cmd/test_data/01_basic_flow_will_pass.yaml \
-o ./docs/example-outputs/images-only \
-r images-only \
-u False
.PHONY: docs
start:
go run main.go
.PHONY: start
clean:
rm build/clingy || true
go run *.go clean
go mod tidy
.PHONY: clean
lint:
docker run \
--rm \
-v $(shell pwd):/app \
-w /app \
golangci/golangci-lint:v1.46 \
golangci-lint run
.PHONY: lint
test:
gotestsum --format testname -- -coverprofile=cover.out ./...
.PHONY: test
pretty:
go fmt ./...
.PHONY: pretty
release:
@echo "don't forget to create and push a git tag! e.g."
@echo " git tag -a v0.1.0 -m 'First release'"
@echo " git push origin v0.1.0"
@sleep 3
goreleaser release
.PHONY: release
build-docker:
docker build -t clingy .
run-docker: build-docker
# See readme on usage
xhost local:root
docker run \
-e DISPLAY=${DISPLAY} \
-v /tmp/.X11-unix:/tmp/.X11-unix \
-v ${PWD}/.clingy.yaml:/home/clingy/.clingy.yaml \
clingy
.PHONY: build-docker run-docker
start-docs:
docker run \
--rm \
-it \
-p 8000:8000 \
-v ${PWD}:/docs squidfunk/mkdocs-material
.PHONY: start-docs