File tree Expand file tree Collapse file tree 2 files changed +47
-10
lines changed Expand file tree Collapse file tree 2 files changed +47
-10
lines changed Original file line number Diff line number Diff line change 1+ language : go
2+
3+ env :
4+ - GO15VENDOREXPERIMENT=0
5+
6+ go :
7+ - 1.5.3
8+ - 1.4.3
9+ - 1.3.3
10+ - 1.6
11+
12+ install :
13+ - go get -u github.com/tools/godep
14+
15+ script :
16+ - make gotest
Original file line number Diff line number Diff line change 1- all : redis-port
1+ .DEFAULT_GOAL := build-all
22
3- godep-env :
4- @command -v godep 2>&1 > /dev/null || go get -u github.com/tools/godep
5- @GOPATH=` godep path` godep restore
3+ export GO15VENDOREXPERIMENT =0
64
7- redis-port : godep-env
8- godep go build -i -o bin/redis-port ./cmd
5+ .PHONY : godep
6+
7+ GODEP :=
8+
9+ ifndef GODEP
10+ GODEP := $(shell \
11+ if which godep 2>&1 >/dev/null; then \
12+ echo "godep"; \
13+ else \
14+ if [ ! -x "${GOPATH}/bin/godep" ]; then \
15+ go get -u github.com/tools/godep; \
16+ fi; \
17+ echo "${GOPATH}/bin/godep"; \
18+ fi;)
19+ endif
20+
21+ build-all : redis-port
22+
23+ godep :
24+ @mkdir -p bin
25+ @GOPATH=` ${GODEP} path` ${GODEP} restore -v 2>&1 | while IFS= read -r line; do echo " >>>> $$ {line}" ; done
26+ @echo
27+
28+ redis-port : godep
29+ ${GODEP} go build -i -o bin/redis-port ./cmd
930
1031clean :
11- rm -rf bin
32+ @ rm -rf bin
1233
1334distclean : clean
14- @rm -rf Godeps/_workspace
35+ @rm -rf Godeps/_workspace/pkg
1536
16- gotest :
17- godep go test -cover -v . /...
37+ gotest : godep
38+ ${GODEP} go test ./pkg /...
You can’t perform that action at this time.
0 commit comments