packer-cn/Makefile

34 lines
777 B
Makefile
Raw Normal View History

TEST?=./...
2015-01-30 07:03:25 -05:00
VETARGS?=-asmdecl -atomic -bool -buildtags -copylocks -methods \
-nilfunc -printf -rangeloops -shift -structtags -unsafeptr
2013-05-07 14:39:32 -04:00
default: test
2013-03-23 03:48:20 -04:00
bin:
@sh -c "$(CURDIR)/scripts/build.sh"
2013-09-17 07:35:07 -04:00
dev:
@TF_DEV=1 sh -c "$(CURDIR)/scripts/build.sh"
2013-08-13 21:42:08 -04:00
test:
go test $(TEST) $(TESTARGS) -timeout=10s
2015-01-30 07:03:25 -05:00
@$(MAKE) vet
2013-07-18 10:26:36 -04:00
testrace:
go test -race $(TEST) $(TESTARGS)
2013-03-24 17:47:59 -04:00
updatedeps:
go get -d -v -p 2 ./...
2013-03-24 17:31:18 -04:00
2015-01-30 07:03:25 -05:00
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