2015-08-04 20:52:44 +00:00
|
|
|
UNAME := $(shell sh -c 'uname')
|
|
|
|
|
|
|
|
ifeq ($(UNAME), Darwin)
|
|
|
|
export ADVERTISED_HOST := $(shell sh -c 'boot2docker ip')
|
|
|
|
endif
|
|
|
|
ifeq ($(UNAME), Linux)
|
|
|
|
export ADVERTISED_HOST := localhost
|
|
|
|
endif
|
|
|
|
|
2015-07-06 04:46:43 +00:00
|
|
|
prepare:
|
|
|
|
go get -d -v -t ./...
|
2015-08-04 20:52:44 +00:00
|
|
|
|
|
|
|
docker-compose:
|
|
|
|
docker-compose up -d
|
|
|
|
|
|
|
|
test: prepare docker-compose
|
|
|
|
go test -v ./...
|
2015-07-06 04:46:43 +00:00
|
|
|
|
2015-08-04 14:58:32 +00:00
|
|
|
test-short: prepare
|
2015-08-04 20:52:44 +00:00
|
|
|
go test -v -short ./...
|
2015-07-06 04:46:43 +00:00
|
|
|
|
2015-08-04 20:52:44 +00:00
|
|
|
test-cleanup:
|
|
|
|
docker-compose kill
|
2015-08-04 14:58:32 +00:00
|
|
|
|
2015-07-06 04:46:43 +00:00
|
|
|
update:
|
|
|
|
go get -u -v -d -t ./...
|
|
|
|
|
|
|
|
.PHONY: test
|