-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
61 lines (46 loc) · 1.13 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
export BUILD_DATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ')
build:
go build -o bin/app src/*.go
run: clean build
./bin/app
.PHONY: kill
kill:
docker kill $(docker ps -q)
.PHONY: compile
compile:
docker exec -it app go build -o /app/bin/app /app/src/
.PHONY: remove
remove:
docker volume prune -f && docker rm -f webserver && docker rm -f app && docker ps -a
.PHONY: docker
docker:
docker-compose up --build
.PHONY: daemon
daemon:
npm run build
docker-compose up --build -d
.PHONY: clean
clean:
rm -f bin/app
.PHONY: test
test:
find . -type f -name "*.go" -exec dirname {} \; | sort -u | xargs -I {} go test -v {}
.PHONY: testgo
testgo:
go test $(go list ./...) -coverageprofile=coverage.out
.PHONY: htmlcoverage
htmlcoverage:
go tool cover --html=coverage.out
.PHONY: coverage
coverage:
go test ./... -covermode=atomic -coverprofile=coverage.out -coverpkg=./...
go tool cover -func=coverage.out
.PHONY: help
help:
@grep '^[^#[:space:]].*:' Makefile | awk -F':' '{print $$1}' | grep -Ev ".PHONY|export"
.PHONY: tidyhtml
tidyhtml:
find . -name "*.html" -exec tidy -m {} \;
.PHONY: linthtml
linthtml:
which eslint || brew install eslint