-
Notifications
You must be signed in to change notification settings - Fork 7
/
Makefile
60 lines (46 loc) · 1.18 KB
/
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
59
# Basic Go makefile
GOCMD=go
GOBUILD=$(GOCMD) build
GOCLEAN=$(GOCMD) clean
GOTEST=$(GOCMD) test -covermode=atomic -coverprofile=coverage.out
GOGET=$(GOCMD) get
# exclude python from std builds
#DIRS=`go list ./... | grep -v python`
DIRS=`go list ./...`
all: build
build:
@echo "GO111MODULE = $(value GO111MODULE)"
$(GOBUILD) -v $(DIRS)
test:
@echo "GO111MODULE = $(value GO111MODULE)"
$(GOTEST) -v $(DIRS)
clean:
@echo "GO111MODULE = $(value GO111MODULE)"
$(GOCLEAN) ./...
fmts:
gofmt -s -w .
vet:
@echo "GO111MODULE = $(value GO111MODULE)"
$(GOCMD) vet $(DIRS)
tidy: export GO111MODULE = on
tidy:
@echo "GO111MODULE = $(value GO111MODULE)"
go mod tidy
old:
@echo "GO111MODULE = $(value GO111MODULE)"
go list -u -m all
mod-update: export GO111MODULE = on
mod-update:
@echo "GO111MODULE = $(value GO111MODULE)"
go get -u ./...
go mod tidy
# gopath-update is for GOPATH to get most things updated.
# need to call it in a target executable directory
gopath-update: export GO111MODULE = off
gopath-update:
@echo "GO111MODULE = $(value GO111MODULE)"
go get -u ./...
mod-update: export GO111MODULE = on
release:
@echo "GO111MODULE = $(value GO111MODULE)"
$(MAKE) -C ki release