-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
46 lines (34 loc) · 877 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
41
42
43
44
45
46
export majorVersion=1
export minorVersion=0
export gittip=$(shell git log --format='%h' -n 1)
export patchVersion=$(shell git log --format='%h' | wc -l)
export ver=$(majorVersion).$(minorVersion).$(patchVersion).$(gittip)
include make/*.mk
tools:
@which podman
@podman version
@which redis-cli
@redis-cli --version
@which go
@go version
# https://go.dev/blog/govulncheck
# install it by go install golang.org/x/vuln/cmd/govulncheck@latest
vuln:
which govulncheck
govulncheck ./...
deps:
go mod download
go mod verify
go mod tidy
test:
go test -v ./...
run: start
build: deps
CGO_ENABLED=0 go build -ldflags "-X main.Version=$(ver)" -o build/stocks_broadcaster main.go
start:
go run main.go ./contrib/local.yaml
binary: build
./build/stocks_broadcaster contrib/local.yaml
tag:
git tag "v$(majorVersion).$(minorVersion).$(patchVersion)"
.PHONY: build