forked from linode/docker-machine-driver-linode
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
42 lines (32 loc) · 713 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
OUT_DIR := out
PROG := docker-machine-driver-linode
GOOS ?= $(shell go env GOOS)
GOARCH ?= $(shell go env GOARCH)
export GO111MODULE=on
ifeq ($(GOOS),windows)
BIN_SUFFIX := ".exe"
endif
.PHONY: build
build: dep
go build -ldflags "-X github.com/linode/docker-machine-driver-linode/pkg/drivers/linode.VERSION=`git describe --always`" -o $(OUT_DIR)/$(PROG)$(BIN_SUFFIX) ./
.PHONY: dep
dep:
@GO111MODULE=on
go get -d ./
go mod verify
.PHONY: test
test: dep
go test -race ./...
.PHONY: check
check:
gofmt -l -s -d pkg/
go vet
.PHONY: clean
clean:
$(RM) $(OUT_DIR)/$(PROG)$(BIN_SUFFIX)
.PHONY: uninstall
uninstall:
$(RM) $(GOPATH)/bin/$(PROG)$(BIN_SUFFIX)
.PHONY: install
install: build
go install