Support Go 1.16 and drop support for Go 1.15
- Document CLI install instructions for Go 1.16 - Update golangci-lint from v1.33.0 to v1.37.0
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
version: 2.1
|
||||
|
||||
jobs:
|
||||
"golang-1_14": &template
|
||||
"golang-1_15": &template
|
||||
machine:
|
||||
# https://circleci.com/docs/2.0/configuration-reference/#available-machine-images
|
||||
image: ubuntu-2004:202010-01
|
||||
@@ -19,7 +19,7 @@ jobs:
|
||||
|
||||
environment:
|
||||
GO111MODULE: "on"
|
||||
GO_VERSION: "1.14.x"
|
||||
GO_VERSION: "1.15.x"
|
||||
|
||||
steps:
|
||||
# - setup_remote_docker:
|
||||
@@ -29,7 +29,7 @@ jobs:
|
||||
- run: curl -sfL -o ~/bin/golangci-lint.sh https://install.goreleaser.com/github.com/golangci/golangci-lint.sh
|
||||
- run: chmod +x ~/bin/gimme ~/bin/golangci-lint.sh
|
||||
- run: eval "$(gimme $GO_VERSION)"
|
||||
- run: golangci-lint.sh -b ~/bin v1.33.0
|
||||
- run: golangci-lint.sh -b ~/bin v1.37.0
|
||||
- checkout
|
||||
- restore_cache:
|
||||
keys:
|
||||
@@ -43,14 +43,14 @@ jobs:
|
||||
- run: go get github.com/mattn/goveralls
|
||||
- run: goveralls -service=circle-ci -coverprofile /tmp/coverage/combined.txt
|
||||
|
||||
"golang-1_15":
|
||||
"golang-1_16":
|
||||
<<: *template
|
||||
environment:
|
||||
GO_VERSION: "1.15.x"
|
||||
GO_VERSION: "1.16.x"
|
||||
|
||||
workflows:
|
||||
version: 2
|
||||
build:
|
||||
jobs:
|
||||
- "golang-1_14"
|
||||
- "golang-1_15"
|
||||
- "golang-1_16"
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
[](https://coveralls.io/github/golang-migrate/migrate?branch=master)
|
||||
[](https://packagecloud.io/golang-migrate/migrate?filter=debs)
|
||||
[](https://hub.docker.com/r/migrate/migrate/)
|
||||

|
||||

|
||||
[](https://github.com/golang-migrate/migrate/releases)
|
||||
[](https://goreportcard.com/report/github.com/golang-migrate/migrate)
|
||||
|
||||
|
||||
@@ -41,17 +41,21 @@ $ apt-get install -y migrate
|
||||
$ go get -u -d github.com/golang-migrate/migrate/cmd/migrate
|
||||
$ cd $GOPATH/src/github.com/golang-migrate/migrate/cmd/migrate
|
||||
$ git checkout $TAG # e.g. v4.1.0
|
||||
$ # Go 1.15 and below
|
||||
$ go build -tags 'postgres' -ldflags="-X main.Version=$(git describe --tags)" -o $GOPATH/bin/migrate $GOPATH/src/github.com/golang-migrate/migrate/cmd/migrate
|
||||
$ # Go 1.16+
|
||||
$ go install -tags 'postgres' -o $GOPATH/bin/migrate github.com/golang-migrate/migrate/v4/cmd/migrate@$TAG
|
||||
```
|
||||
|
||||
#### Unversioned
|
||||
|
||||
```bash
|
||||
$ # Go 1.15 and below
|
||||
$ go get -tags 'postgres' -u github.com/golang-migrate/migrate/cmd/migrate
|
||||
$ # Go 1.16+
|
||||
$ go install -tags 'postgres' github.com/golang-migrate/migrate/v4/cmd/migrate@latest
|
||||
```
|
||||
|
||||
[Make sure](https://github.com/golang-migrate/migrate/pull/257#issuecomment-705249902) you're not installing the `migrate` CLI from a module. e.g. there should not be any `go.mod` files in your current directory or any directory from your current one to the root
|
||||
|
||||
#### Notes
|
||||
|
||||
1. Requires a version of Go that [supports modules](https://golang.org/cmd/go/#hdr-Preliminary_module_support). e.g. Go 1.11+
|
||||
@@ -62,6 +66,7 @@ correspond to the names of the sub-packages underneath the
|
||||
[`database`](../database) package.
|
||||
1. Similarly to the database build tags, if you need to support other sources, use the appropriate build tag(s).
|
||||
1. Support for build constraints will be removed in the future: https://github.com/golang-migrate/migrate/issues/60
|
||||
1. For versions of Go 1.15 and lower, [make sure](https://github.com/golang-migrate/migrate/pull/257#issuecomment-705249902) you're not installing the `migrate` CLI from a module. e.g. there should not be any `go.mod` files in your current directory or any directory from your current directory to the root
|
||||
|
||||
## Usage
|
||||
|
||||
|
||||
Reference in New Issue
Block a user