-
Notifications
You must be signed in to change notification settings - Fork 31
/
Copy pathMakefile
39 lines (32 loc) · 871 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
.PHONY: help
## help: prints this help message
help:
@echo "Usage: \n"
@sed -n 's/^##//p' ${MAKEFILE_LIST} | column -t -s ':' | sed -e 's/^/ /'
.PHONY: generate
## generate: runs `go generate`
generate:
@go generate ./app/...
.PHONY: build
## build: builds server
build:
@cd app && go build -v
.PHONY: vendor
## vendor: runs `go mod vendor`
vendor:
@go mod vendor
.PHONY: test
## test: runs `go test`
test:
@go test ./app/... -coverprofile cover.out
.PHONY: lint
## lint: runs `golangci-lint`
lint:
@golangci-lint run ./app/...
.PHONY: run
## run: runs app locally (don't forget to set all required environment variables)
# examples:
# make run ARGS="--super=umputun"
# make run ARGS="--super=umputun --broadcast=umputun --export-num=684 --export-path=logs --export-day=20200104 --export-template=data/logs.html"
run:
@go run -v app/main.go --dbg ${ARGS}