-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
40 lines (29 loc) · 957 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
36
37
38
39
40
.PHONY: all
# all: clear_media server_start
build:
./scripts/deploy/build_all.sh
push:
./scripts/deploy/push.sh
start:
docker-compose down
docker-compose up -d
docker-compose up
clean_containers:
docker system prune
clear_media:
rm -r ./img ./covers ./records ./avatars
lint:
go vet ./... && golangci-lint run
check_coverage:
go test -coverpkg=./... -coverprofile=coverage.out ./... \
&& cat coverage.out | fgrep -v "mocks" | fgrep -v "docs" | fgrep -v "easyjson" > purified_coverage.out \
&& go tool cover -func purified_coverage.out | grep total
check_html_coverage:
go test -coverpkg=./... -coverprofile=coverage.out ./... \
&& cat coverage.out | fgrep -v "mocks" | fgrep -v "docs" | fgrep -v "easyjson" > purified_coverage.out \
&& go tool cover -func purified_coverage.out | grep total \
&& go tool cover -html purified_coverage.out -o cover.html
generate_api_docs:
swag init -g cmd/api/main.go
generate:
go generate ./...