Skip to content

Commit

Permalink
Use git describe --tags to set the version number when building the…
Browse files Browse the repository at this point in the history
… CLI
  • Loading branch information
dhui committed Nov 12, 2018
1 parent 323427e commit f38fe38
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cli/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ $ apt-get install -y migrate
```
$ go get -u -d github.com/golang-migrate/migrate/cli
$ cd $GOPATH/src/github.com/golang-migrate/migrate/cli
$ go build -tags 'postgres' -o /usr/local/bin/migrate github.com/golang-migrate/migrate/cli
$ go build -tags 'postgres' -ldflags="-X main.Version=$(git describe --tags)" -o /usr/local/bin/migrate github.com/golang-migrate/migrate/cli
```

##### Notes:
Expand Down

0 comments on commit f38fe38

Please sign in to comment.