-
-
Notifications
You must be signed in to change notification settings - Fork 21
Expand file tree
/
Copy pathMakefile
More file actions
39 lines (26 loc) · 631 Bytes
/
Copy pathMakefile
File metadata and controls
39 lines (26 loc) · 631 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
33
34
35
36
37
38
39
VERSION=`git --no-pager describe --tags --always`
LDFLAGS+=
LDFLAGS+=-X main.version=${VERSION}
.PHONY: build install run test cover lint vet fmt tidy docker clean
build:
go build -ldflags "${LDFLAGS}" -o bin/serve ./cmd/serve
install:
go install -ldflags "${LDFLAGS}" ./cmd/serve
run:
go run ./cmd/serve
test:
go test -race -covermode=atomic -coverprofile=coverage.out ./...
cover: test
go tool cover -func=coverage.out
lint:
golangci-lint run
vet:
go vet ./...
fmt:
gofmt -s -w .
tidy:
go mod tidy
docker:
docker build -t syntaqx/serve --build-arg VERSION=${VERSION} .
clean:
rm -rf bin dist coverage.out