-
Notifications
You must be signed in to change notification settings - Fork 3
/
Makefile
35 lines (25 loc) · 876 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
31
32
33
34
35
CURRENT_DIR = $(shell pwd)
GO_TEST_FLAGS := -v -cover -count=1 -race
GO_TEST_TARGET := ./...
test:
go test $(GO_TEST_FLAGS) $(GO_TEST_TARGET)
dotfile:
go build -o bin/dotfile cmd/dotfile/main.go
htmlgen:
go build -o bin/htmlgen cmd/htmlgen/main.go
htmldocs: htmlgen
bin/htmlgen -out server/html && bin/htmlgen -in docs/ -out server/html
dotfilehub: htmldocs
go build -o bin/dotfilehub cmd/dotfilehub/main.go
dotfilehub_image:
docker build . --tag dotfilehub
run_dotfilehub_image: dotfilehub_image
docker container run -p=8080:8080\
--mount type=bind,source=${HOME}/.dotfilehub.db,target=/data/dotfilehub.db\
--mount type=bind,source=$(CURRENT_DIR)/server/smtp.sample.json,target=/data/smtp.json\
dotfilehub
deploy: test
fly deploy
clean:
rm -rf bin/*
.PHONY: test dotfile htmlgen htmldocs dotfilehub dotfilehub_image run_dotfilehub_image deploy clean