2016-02-13 00:50:37 +00:00
|
|
|
.PHONY: \
|
|
|
|
all \
|
|
|
|
lint \
|
|
|
|
vet \
|
|
|
|
fmt \
|
|
|
|
fmtcheck \
|
|
|
|
pretest \
|
|
|
|
test \
|
|
|
|
integration \
|
|
|
|
clean
|
|
|
|
|
|
|
|
all: test
|
|
|
|
|
|
|
|
lint:
|
|
|
|
@ go get -v github.com/golang/lint/golint
|
2016-08-09 23:42:51 +00:00
|
|
|
@ export output="$$(golint . | grep -v 'type name will be used as docker.DockerInfo')"; \
|
|
|
|
[ -n "$${output}" ] && echo "$${output}" && export status=1; \
|
|
|
|
exit $${status:-0}
|
2016-02-13 00:50:37 +00:00
|
|
|
|
|
|
|
vet:
|
2016-08-09 23:42:51 +00:00
|
|
|
go vet ./...
|
2016-02-13 00:50:37 +00:00
|
|
|
|
|
|
|
fmt:
|
2016-08-09 23:42:51 +00:00
|
|
|
gofmt -s -w .
|
2016-02-13 00:50:37 +00:00
|
|
|
|
|
|
|
fmtcheck:
|
2016-08-09 23:42:51 +00:00
|
|
|
[ -z "$$(gofmt -s -d . | tee /dev/stderr)" ]
|
2016-02-13 00:50:37 +00:00
|
|
|
|
2016-08-09 23:42:51 +00:00
|
|
|
testdeps:
|
|
|
|
go get -d -t ./...
|
2016-02-13 00:50:37 +00:00
|
|
|
|
2016-08-09 23:42:51 +00:00
|
|
|
pretest: testdeps lint vet fmtcheck
|
2016-02-13 00:50:37 +00:00
|
|
|
|
2016-08-09 23:42:51 +00:00
|
|
|
gotest:
|
|
|
|
go test $(GO_TEST_FLAGS) ./...
|
|
|
|
|
|
|
|
test: pretest gotest
|
2016-02-13 00:50:37 +00:00
|
|
|
|
|
|
|
integration:
|
|
|
|
go test -tags docker_integration -run TestIntegration -v
|
|
|
|
|
|
|
|
clean:
|
2016-08-09 23:42:51 +00:00
|
|
|
go clean ./...
|