-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
58 lines (43 loc) · 937 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
47
48
49
50
51
52
53
54
55
56
57
58
BINARY=segment-subscription-event-producer
ASSETS_LOCATION=views
ASSETS_FILE=assets.go
all: build
#
# Deps
#
deps-tools:
go get -x github.com/cespare/reflex
go get -x github.com/rakyll/gotest
go get -x github.com/psampaz/go-mod-outdated
go get -x github.com/golangci/golangci-lint/cmd/golangci-lint
go get -x github.com/sonatype-nexus-community/nancy
deps: deps-tools
go mod download -x
cleanup-deps:
go mod tidy
audit: cleanup-deps
go list -json -m all | nancy sleuth
outdated: cleanup-deps
go list -u -m -json all | go-mod-outdated -update -direct
#
# Build
#
build:
go build -o ${BINARY} ./*.go
watch:
reflex -t 50ms -s -- sh -c 'echo \\nBUILDING && go run ./*.go && echo Exited \(0\)'
#
# Quality
#
lint:
golangci-lint run --fix --timeout 600s --path-prefix=./ ./...
test:
gotest -v ./tests/...
watch-test: deps
reflex -t 50ms -s -- sh -c 'make test'
#
# Cleaning
#
clean:
rm -f ${BINARY}
re: clean all