GOPATH ?= $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))

.PHONY: all
all: ting

.PHONY: ting
ting:
	go install ting

.PHONY: test
test:
	go test -tags test -test.v -cover ting/...

.PHONY: version
version:
	./gen_version.sh

bin/migrate:
	-[ ! -d migrate ] && mkdir -p migrate/src/github.com && cp -r src/ting/vendor/github.com/mattes migrate/src/github.com
	GOPATH="$$PWD/migrate" go build -o bin/migrate github.com/mattes/migrate/cli
