mirror of
https://github.com/TECHNOFAB11/dbmate.git
synced 2025-12-11 23:50:04 +01:00
Separate cmd package for easier importing (#11)
This commit is contained in:
parent
247d7296f8
commit
e393f387b3
21 changed files with 408 additions and 368 deletions
17
Makefile
17
Makefile
|
|
@ -1,7 +1,8 @@
|
|||
DC := docker-compose
|
||||
BUILD_FLAGS := -ldflags '-s'
|
||||
PACKAGES := . ./cmd/dbmate
|
||||
|
||||
all: clean container lint test build
|
||||
all: clean container test lint build
|
||||
|
||||
clean:
|
||||
rm -rf dist
|
||||
|
|
@ -12,15 +13,15 @@ container:
|
|||
$(DC) up -d
|
||||
|
||||
lint:
|
||||
$(DC) run dbmate golint
|
||||
$(DC) run dbmate go vet
|
||||
$(DC) run dbmate errcheck
|
||||
$(DC) run dbmate golint -set_exit_status $(PACKAGES)
|
||||
$(DC) run dbmate go vet $(PACKAGES)
|
||||
$(DC) run dbmate errcheck $(PACKAGES)
|
||||
|
||||
test:
|
||||
$(DC) run dbmate go test -v
|
||||
$(DC) run dbmate go test -v $(PACKAGES)
|
||||
|
||||
build: clean
|
||||
$(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
|
||||
$(DC) run -e GOARCH=386 dbmate go build $(BUILD_FLAGS) -o dist/dbmate-linux-i386 ./cmd/dbmate
|
||||
$(DC) run -e GOARCH=amd64 dbmate go build $(BUILD_FLAGS) -o dist/dbmate-linux-amd64 ./cmd/dbmate
|
||||
# musl target does not support sqlite
|
||||
$(DC) run -e GOARCH=amd64 -e CGO_ENABLED=0 dbmate go build $(BUILD_FLAGS) -o dist/dbmate-linux-musl-amd64
|
||||
$(DC) run -e GOARCH=amd64 -e CGO_ENABLED=0 dbmate go build $(BUILD_FLAGS) -o dist/dbmate-linux-musl-amd64 ./cmd/dbmate
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue