-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathMakefile
More file actions
32 lines (23 loc) · 694 Bytes
/
Copy pathMakefile
File metadata and controls
32 lines (23 loc) · 694 Bytes
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
MYGOBIN = $(PWD)/bin
GIT_SHA = $(shell git rev-parse --short HEAD)
install-tools:
@echo MYGOBIN: $(MYGOBIN)
@cat tools/tools.go | grep _ | awk -F'"' '{print $$2}' | GOBIN=$(MYGOBIN) xargs -tI % go install %
install:
@echo MYGOBIN: $(MYGOBIN)
GOBIN=$(MYGOBIN) go install ./...
test:
go test -race ./...
test-coverage:
go test -race -covermode atomic -coverprofile=coverprofile.txt ./...
lint:
$(MYGOBIN)/golangci-lint run
build:
go build -ldflags="-X 'main.version=$(GIT_SHA)'" -o bin/api cmd/api/main.go
run-dev:
APP_ENV=development go run cmd/api/main.go
.PHONY: gen-mocks
gen-mocks:
pkg/testsupport/mocks/gen_mocks.sh
goreleaser-snapshot:
goreleaser --snapshot --clean