dbmate/Makefile

23 lines
437 B
Makefile
Raw Normal View History

DC := docker-compose
2016-05-21 20:01:49 -07:00
BUILD_FLAGS := -ldflags '-s'
2015-11-25 10:57:58 -08:00
2015-12-01 18:35:18 -08:00
all: clean container lint test build
clean:
rm -rf dist
2015-11-25 10:57:58 -08:00
2015-12-01 17:36:23 -08:00
container:
$(DC) build
2015-11-25 10:57:58 -08:00
lint:
$(DC) run dbmate golint
$(DC) run dbmate go vet
$(DC) run dbmate errcheck
2015-11-25 10:57:58 -08:00
test:
$(DC) run dbmate go test -v
2015-12-01 17:36:23 -08:00
build: clean
2016-05-21 20:01:49 -07:00
$(DC) run -e GOARCH=386 dbmate go build $(BUILD_FLAGS) -o dist/dbmate-linux-i386
$(DC) run -e GOARCH=amd64 dbmate go build $(BUILD_FLAGS) -o dist/dbmate-linux-amd64