-
Notifications
You must be signed in to change notification settings - Fork 164
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
47 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
language: go | ||
|
||
env: | ||
- GO15VENDOREXPERIMENT=0 | ||
|
||
go: | ||
- 1.5.3 | ||
- 1.4.3 | ||
- 1.3.3 | ||
- 1.6 | ||
|
||
install: | ||
- go get -u github.com/tools/godep | ||
|
||
script: | ||
- make gotest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,38 @@ | ||
all: redis-port | ||
.DEFAULT_GOAL := build-all | ||
|
||
godep-env: | ||
@command -v godep 2>&1 >/dev/null || go get -u github.com/tools/godep | ||
@GOPATH=`godep path` godep restore | ||
export GO15VENDOREXPERIMENT=0 | ||
|
||
redis-port: godep-env | ||
godep go build -i -o bin/redis-port ./cmd | ||
.PHONY: godep | ||
|
||
GODEP := | ||
|
||
ifndef GODEP | ||
GODEP := $(shell \ | ||
if which godep 2>&1 >/dev/null; then \ | ||
echo "godep"; \ | ||
else \ | ||
if [ ! -x "${GOPATH}/bin/godep" ]; then \ | ||
go get -u github.com/tools/godep; \ | ||
fi; \ | ||
echo "${GOPATH}/bin/godep"; \ | ||
fi;) | ||
endif | ||
|
||
build-all: redis-port | ||
|
||
godep: | ||
@mkdir -p bin | ||
@GOPATH=`${GODEP} path` ${GODEP} restore -v 2>&1 | while IFS= read -r line; do echo " >>>> $${line}"; done | ||
@echo | ||
|
||
redis-port: godep | ||
${GODEP} go build -i -o bin/redis-port ./cmd | ||
|
||
clean: | ||
rm -rf bin | ||
@rm -rf bin | ||
|
||
distclean: clean | ||
@rm -rf Godeps/_workspace | ||
@rm -rf Godeps/_workspace/pkg | ||
|
||
gotest: | ||
godep go test -cover -v ./... | ||
gotest: godep | ||
${GODEP} go test ./pkg/... |