-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathMakefile
More file actions
40 lines (26 loc) · 662 Bytes
/
Makefile
File metadata and controls
40 lines (26 loc) · 662 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
40
default: stargate
RELEASE_DEPS = fmt lint
include release.mk
SOURCES := $(shell find . -type f -name "*.go")
.PHONY: all fmt clean docker lint
stargate: ${SOURCES} go.mod go.sum
CGO_ENABLED=0 go build -ldflags "-w -s -X main.version=${VERSION}" -trimpath -o $@ cmd/*.go
clean:
rm stargate
fmt:
go fmt ./...
lint:
golangci-lint run
docker: Dockerfile *.go go.mod
docker build -t lanrat/stargate --build-arg VERSION=${VERSION} .
update-deps: go.mod
GOPROXY=direct go get -u ./...
go mod tidy
deps: go.mod
GOPROXY=direct go mod download
.PHONY: goreleaser
goreleaser:
goreleaser release --snapshot --clean
.PHONY: test
test:
go test -v ./...