-
Notifications
You must be signed in to change notification settings - Fork 4
/
Makefile
55 lines (42 loc) · 1016 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
export CGO_ENABLED:=0
export GO111MODULE=on
#export GOFLAGS=-mod=vendor
VERSION=$(shell git describe --tags --match "v*" --always --dirty)
.PHONY: all
all: build test vet lint fmt
.PHONY: build
build: clean bin/terraform-provider-instana
bin/terraform-provider-instana:
@echo "+++++++++++ Run GO Build +++++++++++ "
@go build -o $@ github.com/instana/terraform-provider-instana
.PHONY: test
test:
@echo "+++++++++++ Run GO Test +++++++++++ "
@go test -v ./... -cover
.PHONY: gosec
gosec:
@echo "+++++++++++ Run GO SEC +++++++++++ "
@gosec ./...
.PHONY: vet
vet:
@echo "+++++++++++ Run GO VET +++++++++++ "
@go vet -all ./...
.PHONY: lint
lint:
@echo "+++++++++++ Run GO Lint +++++++++++ "
@golangci-lint run
.PHONY: fmt
fmt:
@echo "+++++++++++ Run GO FMT +++++++++++ "
@test -z $$(go fmt ./...)
.PHONY: update
update:
@GOFLAGS="" go get -u
@go mod tidy
.PHONY: vendor
vendor:
@go mod vendor
.PHONY: clean
clean:
@echo "+++++++++++ Clean up project +++++++++++ "
@rm -rf bin