migrate/Makefile

31 lines
503 B
Makefile
Raw Normal View History

TESTFLAGS?=
2015-10-15 16:49:43 +00:00
IMAGE=mattes/migrate
DCR=docker-compose run --rm
GOTEST=go test $(TESTFLAGS) `go list ./... | grep -v "/vendor/"`
2015-10-15 16:49:43 +00:00
.PHONY: clean test build release docker-build docker-push run
2015-10-15 16:49:43 +00:00
all: release
clean:
rm -f migrate
fmt:
@gofmt -s -w `go list -f {{.Dir}} ./... | grep -v "/vendor/"`
test: fmt
$(DCR) go-test
go-test: fmt
@$(GOTEST)
2015-10-15 16:49:43 +00:00
build:
$(DCR) go-build
release: test build docker-build docker-push
docker-build:
docker build --rm -t $(IMAGE) .
docker-push:
docker push $(IMAGE)