Skip to content

Commit

Permalink
Support Go 1.16 and drop support for Go 1.15
Browse files Browse the repository at this point in the history
- Document CLI install instructions for Go 1.16
- Update golangci-lint from v1.33.0 to v1.37.0
  • Loading branch information
dhui committed Feb 19, 2021
1 parent 8709f19 commit e57a024
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 9 deletions.
12 changes: 6 additions & 6 deletions .circleci/config.yml
Expand Up @@ -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
Expand All @@ -19,7 +19,7 @@ jobs:

environment:
GO111MODULE: "on"
GO_VERSION: "1.14.x"
GO_VERSION: "1.15.x"

steps:
# - setup_remote_docker:
Expand All @@ -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:
Expand All @@ -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"
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -3,7 +3,7 @@
[![Coverage Status](https://img.shields.io/coveralls/github/golang-migrate/migrate/master.svg)](https://coveralls.io/github/golang-migrate/migrate?branch=master)
[![packagecloud.io](https://img.shields.io/badge/deb-packagecloud.io-844fec.svg)](https://packagecloud.io/golang-migrate/migrate?filter=debs)
[![Docker Pulls](https://img.shields.io/docker/pulls/migrate/migrate.svg)](https://hub.docker.com/r/migrate/migrate/)
![Supported Go Versions](https://img.shields.io/badge/Go-1.14%2C%201.15-lightgrey.svg)
![Supported Go Versions](https://img.shields.io/badge/Go-1.15%2C%201.16-lightgrey.svg)
[![GitHub Release](https://img.shields.io/github/release/golang-migrate/migrate.svg)](https://github.com/golang-migrate/migrate/releases)
[![Go Report Card](https://goreportcard.com/badge/github.com/golang-migrate/migrate)](https://goreportcard.com/report/github.com/golang-migrate/migrate)

Expand Down
9 changes: 7 additions & 2 deletions cmd/migrate/README.md
Expand Up @@ -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+
Expand All @@ -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

Expand Down

1 comment on commit e57a024

@dhui
Copy link
Member Author

@dhui dhui commented on e57a024 Feb 19, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's a typo in this commit message. Support for Go 1.15 remains and support for Go 1.14 is dropped

Please sign in to comment.