Commit graph

33 commits

Author SHA1 Message Date
Adrian Macneil
cdbbdd65ea
Add Apple silicon (darwin/arm64) build (#211) 2021-04-07 21:16:18 +00:00
Adrian Macneil
b020782b0e
v1.12.0 (#210) 2021-04-07 13:51:50 -07:00
Adrian Macneil
61771e386d
Refactor drivers into separate packages (#179)
`dbmate` package was starting to get a bit polluted. This PR migrates each driver into a separate package, with clean separation between each.

In addition:

* Drivers are now initialized with a URL, avoiding the need to pass `*url.URL` to every method
* Sqlite supports a cleaner syntax for relative paths
* Driver tests now load their test URL from environment variables

Public API of `dbmate` package has not changed (no changes to `main` package).
2020-11-19 15:04:42 +13:00
Adrian Macneil
e44e09eb67
Migrate CI to GitHub Actions (#171) 2020-11-02 20:22:59 +13:00
Adrian Macneil
4581acafad
Build statically linked binaries (#156)
Prior to this commit, we released two linux binaries:

* `dbmate-linux-amd64` (built with cgo, dynamically linked)
* `dbmate-linux-musl-amd64` (built without cgo, statically linked, no sqlite support)

The statically linked binary is desirable for alpine linux users (or anyone else using musl libc or minimal docker images). The original reason for having two separate binaries was that the easiest method to create a static binary for go is to set `CGO_ENABLED=0`, but unfortunately this also prevented us from building sqlite (which requires cgo).

With this commit, all linux and windows binaries are explicitly statically linked while leaving cgo enabled. Hat tip to https://www.arp242.net/static-go.html which explained the necessary flags to enable this.

As an added bonus, the `dbmate` docker image now now uses a `scratch` base rather than `gcr.io/distroless/base`, reducing the image size from 26.7 MB to 9.8 MB.
2020-08-11 13:05:55 -07:00
Adrian Macneil
df461ff6c7
Add linux/arm64 build (#155) 2020-08-08 16:25:13 -07:00
Ilia Ablamonov
c2dd1bd5af
Add ClickHouse support (#140) 2020-08-07 13:38:48 -07:00
Adrian Macneil
de0b51e623
Update dependencies (#134) 2020-05-24 15:55:32 -07:00
Adrian Macneil
f7a3390299
Add make docker-bash helper (#123) 2020-03-15 08:58:05 -07:00
Adrian Macneil
98066fadaa
Stricter linting (#113) 2020-01-01 19:11:02 -10:00
Adrian Macneil
18ffa457d6
Automatically publish builds from Travis (#92) 2019-09-24 22:06:21 -07:00
Adrian Macneil
aa72a39a29
Cross-compile macOS and Windows builds (#89)
Adds support for cross-compiling macOS and Windows builds with cgo (using https://github.com/techknowlogick/xgo).

Closes #41
2019-09-18 22:30:59 +12:00
Adrian Macneil
da3d9525cf
Go v1.11 (#60)
* Go v1.11
* [Go Modules](https://github.com/golang/go/wiki/Modules)
* [GolangCI-Lint](https://github.com/golangci/golangci-lint)
* [Distroless](https://github.com/GoogleContainerTools/distroless) docker image
2018-12-01 22:28:47 -08:00
Adrian Macneil
c5afa36962
Replace docker-compose healthchecks with wait command (#37) 2018-04-15 20:34:19 -07:00
Adrian Macneil
ee3162c34c
Add gometalinter (#36) 2018-04-15 19:59:56 -07:00
Adrian Macneil
6ba419a74b
Move cmd to project root for easier installs (#29) 2018-01-24 11:30:08 -08:00
Adrian Macneil
df119a76f3
Migrate to dep for dependency management (#26)
* Replace `Godeps` with `dep`
* Upgrade all dependencies
* Remove vendor source from git repository
2018-01-23 17:11:34 -08:00
Adrian Macneil
c2fc8b5441
Simplify Makefile and docker usage (#24) 2018-01-22 21:49:12 -08:00
Adrian Macneil
54a9fbc859
Move code into pkg directory (#22) 2018-01-07 20:12:56 -08:00
Adrian Macneil
4e01c75eca
Add docker runtime image (#21)
Closes #17
2018-01-07 19:08:43 -08:00
Adrian Macneil
f150d6aeff
Remove i386 cross-compile binary (#20) 2018-01-07 13:15:57 -08:00
Adrian Macneil
e393f387b3 Separate cmd package for easier importing (#11) 2017-05-04 20:58:23 -07:00
Adrian Macneil
247d7296f8 Add docker-compose healthcheck for test dependencies (#12) 2017-04-23 20:46:27 -07:00
Adrian Macneil
93490b2f15 Add musl target for Alpine linux support (#8)
Building with `CGO_ENABLED=0` results in a binary which can run on Alpine linux (with musl libc), but it also disables SQLite support.

Adding an additional target allows people to decide this tradeoff for themselves.
2017-02-28 21:54:01 -08:00
Adrian Macneil
08dd47d954 Create slimmer go binaries 2016-05-21 20:01:49 -07:00
Adrian Macneil
b74629e5be Remove osx cross compilation in favor of homebrew 2015-12-03 01:13:39 -08:00
Adrian Macneil
158ecaa965 Add clean step 2015-12-01 18:35:18 -08:00
Adrian Macneil
d318e68423 Add cross compilation scripts 2015-12-01 18:03:44 -08:00
Adrian Macneil
87f981da09 No longer need to test all packages 2015-12-01 10:16:23 -08:00
Adrian Macneil
c402613c6c Add MySQL support 2015-12-01 00:44:28 -08:00
Adrian Macneil
edb027f6e9 Run tests in serial
Prevents race conditions when creating/dropping databases.

See: http://stackoverflow.com/questions/15721238/go-serial-execution-of-package-tests
2015-11-30 18:36:24 -08:00
Adrian Macneil
c6aba53e51 Add errcheck and fix unchecked errors 2015-11-27 14:27:44 -08:00
Adrian Macneil
9cfc758ca1 Initial commit 2015-11-25 10:57:58 -08:00