Skip to content

Commit

Permalink
Add guide for installing a specific version of migrate using the Go…
Browse files Browse the repository at this point in the history
… toolchain
  • Loading branch information
dhui authored Nov 28, 2018
1 parent 0d5d918 commit f1d88ac
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions cli/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,20 @@ $ apt-get install -y migrate

#### With Go toolchain

##### Unversioned
```
$ go get -tags 'postgres' -u github.com/golang-migrate/migrate/cmd/migrate
```

##### Versioned

```
$ 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 build -tags 'postgres' -ldflags="-X main.Version=$(git describe --tags)" -o $GOPATH/bin/migrate github.com/golang-migrate/migrate/cmd/migrate
```

##### Notes:
1. Requires a version of Go that [supports modules](https://golang.org/cmd/go/#hdr-Preliminary_module_support). e.g. Go 1.11+
1. This example builds the cli which will only work with postgres. In order
Expand Down

0 comments on commit f1d88ac

Please sign in to comment.