-
Notifications
You must be signed in to change notification settings - Fork 16
/
Makefile
41 lines (31 loc) · 985 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
# Makefile for CITF
build: vet fmt golint
# Tools required for different make targets or for development purposes
EXTERNAL_TOOLS = \
github.com/fzipp/gocyclo \
golang.org/x/lint/golint \
github.com/onsi/ginkgo/ginkgo \
github.com/onsi/gomega/...
vet:
go list ./... | grep -v "./vendor/*" | xargs go vet
fmt:
find . -type f -name "*.go" | grep -v "./vendor/*" | xargs gofmt -s -w -l
# Run the bootstrap target once before trying golint in Development environment
golint:
go list ./... | grep -v "./vendor/*" | xargs golint
# Run the bootstrap target once before trying gocyclo in Development environment
gocyclo:
gocyclo . | grep -v vendor
# Target for running go test
test: vet fmt
@echo "--> Running go test";
$(PWD)/test.sh
integration-test:
go test -v github.com/openebs/CITF/example
# Bootstrap the build by downloading additional tools
bootstrap:
@for tool in $(EXTERNAL_TOOLS) ; do \
echo "Installing $$tool" ; \
go get -u $$tool; \
done
.PHONY: build