forked from hashicorp/packer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
33 lines (25 loc) · 777 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
TEST?=./...
VETARGS?=-asmdecl -atomic -bool -buildtags -copylocks -methods \
-nilfunc -printf -rangeloops -shift -structtags -unsafeptr
default: test
bin:
@sh -c "$(CURDIR)/scripts/build.sh"
dev:
@TF_DEV=1 sh -c "$(CURDIR)/scripts/build.sh"
test:
go test $(TEST) $(TESTARGS) -timeout=10s
@$(MAKE) vet
testrace:
go test -race $(TEST) $(TESTARGS)
updatedeps:
go get -d -v -p 2 ./...
vet:
@go tool vet 2>/dev/null ; if [ $$? -eq 3 ]; then \
go get golang.org/x/tools/cmd/vet; \
fi
@go tool vet $(VETARGS) . ; if [ $$? -eq 1 ]; then \
echo ""; \
echo "Vet found suspicious constructs. Please check the reported constructs"; \
echo "and fix them if necessary before submitting the code for reviewal."; \
fi
.PHONY: bin default test updatedeps vet