Update Makefile

This commit is contained in:
2016-07-11 14:07:40 +01:00
parent 0dd530828d
commit 3a8669b394

View File

@@ -1,14 +1,12 @@
DIRS = $(shell go list ./... | grep -v /vendor/)
DEV_DEPS = github.com/kardianos/govendor \ DEV_DEPS = github.com/kardianos/govendor \
github.com/vektra/mockery/.../ \ github.com/vektra/mockery/.../ \
github.com/mailru/easyjson/... github.com/mailru/easyjson/...
test: test: dev-deps
@go test $(DIRS) @govendor test +local +program
generate: dev-deps generate: dev-deps
@go generate $(DIRS) @govendor generate +local +program
build: build:
mkdir -p bin && go build -o bin/ozuio mkdir -p bin && go build -o bin/ozuio
@@ -16,8 +14,11 @@ build:
run: build run: build
./bin/ozuio ./bin/ozuio
install-vendor: fetch-vendor: dev-deps
go install ./vendor/... @govendor fetch +external +missing
install-vendor: dev-deps
@govendor install +vendor
dev-deps: dev-deps:
@$(foreach DEP,$(DEV_DEPS),go get $(DEP);) @$(foreach DEP,$(DEV_DEPS),go get $(DEP);)
@@ -25,4 +26,4 @@ dev-deps:
update-dev-deps: update-dev-deps:
@$(foreach DEP,$(DEV_DEPS),go get -u $(DEP);) @$(foreach DEP,$(DEV_DEPS),go get -u $(DEP);)
.PHONY: test build generate run install-vendor dev-deps .PHONY: test generate build run install-vendor dev-deps update-dev-deps