Skip to content

Commit 15611d4

Browse files
committed
Fix cli builds
- Removed sqlite3 support from binaries - It was never working anyways: mattes/migrate#244 - Don't use cgo as is requires a cross-compiler to build for other platforms - cgo was originally added for this reason: mattes/migrate#238 (comment)
1 parent d542e14 commit 15611d4

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Makefile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
SOURCE ?= file go-bindata github aws-s3 google-cloud-storage
2-
DATABASE ?= postgres mysql redshift cassandra sqlite3 spanner cockroachdb clickhouse
2+
DATABASE ?= postgres mysql redshift cassandra spanner cockroachdb clickhouse
33
VERSION ?= $(shell git describe --tags 2>/dev/null | cut -c 2-)
44
TEST_FLAGS ?=
55
REPO_OWNER ?= $(shell cd .. && basename "$$(pwd)")
@@ -8,9 +8,9 @@ COVERAGE_DIR ?= .coverage
88

99
build-cli: clean
1010
-mkdir ./cli/build
11-
cd ./cli && CGO_ENABLED=1 GOOS=linux GOARCH=amd64 go build -a -o build/migrate.linux-amd64 -ldflags='-X main.Version=$(VERSION)' -tags '$(DATABASE) $(SOURCE)' .
12-
cd ./cli && CGO_ENABLED=1 GOOS=darwin GOARCH=amd64 go build -a -o build/migrate.darwin-amd64 -ldflags='-X main.Version=$(VERSION)' -tags '$(DATABASE) $(SOURCE)' .
13-
cd ./cli && CGO_ENABLED=1 GOOS=windows GOARCH=amd64 go build -a -o build/migrate.windows-amd64.exe -ldflags='-X main.Version=$(VERSION)' -tags '$(DATABASE) $(SOURCE)' .
11+
cd ./cli && GOOS=linux GOARCH=amd64 go build -a -o build/migrate.linux-amd64 -ldflags='-X main.Version=$(VERSION)' -tags '$(DATABASE) $(SOURCE)' .
12+
cd ./cli && GOOS=darwin GOARCH=amd64 go build -a -o build/migrate.darwin-amd64 -ldflags='-X main.Version=$(VERSION)' -tags '$(DATABASE) $(SOURCE)' .
13+
cd ./cli && GOOS=windows GOARCH=amd64 go build -a -o build/migrate.windows-amd64.exe -ldflags='-X main.Version=$(VERSION)' -tags '$(DATABASE) $(SOURCE)' .
1414
cd ./cli/build && find . -name 'migrate*' | xargs -I{} tar czf {}.tar.gz {}
1515
cd ./cli/build && shasum -a 256 * > sha256sum.txt
1616
cat ./cli/build/sha256sum.txt

0 commit comments

Comments
 (0)