Repository: calcite-avatica-go Updated Branches: refs/heads/master eb4d11c77 -> f5495e1de
[CALCITE-2335] Update documentation and release process for Go modules Project: http://git-wip-us.apache.org/repos/asf/calcite-avatica-go/repo Commit: http://git-wip-us.apache.org/repos/asf/calcite-avatica-go/commit/f5495e1d Tree: http://git-wip-us.apache.org/repos/asf/calcite-avatica-go/tree/f5495e1d Diff: http://git-wip-us.apache.org/repos/asf/calcite-avatica-go/diff/f5495e1d Branch: refs/heads/master Commit: f5495e1de3b88780123058d8908c9811ac9eb76e Parents: eb4d11c Author: Francis Chuang <[email protected]> Authored: Wed Aug 29 11:02:52 2018 +1000 Committer: Francis Chuang <[email protected]> Committed: Wed Aug 29 11:02:52 2018 +1000 ---------------------------------------------------------------------- README.md | 8 +++++++- make-release-artifacts.sh | 2 +- site/_docs/go_client_reference.md | 9 ++++++++- site/develop/avatica-go.md | 5 +++++ 4 files changed, 21 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/calcite-avatica-go/blob/f5495e1d/README.md ---------------------------------------------------------------------- diff --git a/README.md b/README.md index 8e15b68..60a9e45 100644 --- a/README.md +++ b/README.md @@ -27,12 +27,18 @@ Apache Calcite's Avatica Go is a Go [database/sql](https://golang.org/pkg/databa Avatica is a sub-project of [Apache Calcite](https://calcite.apache.org). ## Quick Start -Install using your dependency management tool (we recommend [dep](https://github.com/golang/dep)!): +If you are using Go 1.10 and below, install using [dep](https://github.com/golang/dep): ``` $ dep ensure -add github.com/apache/calcite-avatica-go ``` +If you are using Go 1.11 and above, install using Go modules: + +``` +$ go get github.com/apache/calcite-avatica-go +``` + The Phoenix/Avatica driver implements Go's `database/sql/driver` interface, so, import the `database/sql` package and the driver: http://git-wip-us.apache.org/repos/asf/calcite-avatica-go/blob/f5495e1d/make-release-artifacts.sh ---------------------------------------------------------------------- diff --git a/make-release-artifacts.sh b/make-release-artifacts.sh index 280ad80..3c8ccae 100755 --- a/make-release-artifacts.sh +++ b/make-release-artifacts.sh @@ -40,7 +40,7 @@ for i in $(git ls-files); do (LICENSE|NOTICE);; # Generated files - (message/common.pb.go|message/requests.pb.go|message/responses.pb.go|Gopkg.lock|Gopkg.toml);; + (message/common.pb.go|message/requests.pb.go|message/responses.pb.go|Gopkg.lock|Gopkg.toml|go.mod|go.sum);; # Binaries (test-fixtures/calcite.png);; http://git-wip-us.apache.org/repos/asf/calcite-avatica-go/blob/f5495e1d/site/_docs/go_client_reference.md ---------------------------------------------------------------------- diff --git a/site/_docs/go_client_reference.md b/site/_docs/go_client_reference.md index 58f8df0..c5c4ec2 100644 --- a/site/_docs/go_client_reference.md +++ b/site/_docs/go_client_reference.md @@ -35,12 +35,19 @@ hood. {:toc} ## Getting Started -Install using your dependency management tool (we recommend [dep](https://github.com/golang/dep)!): +If you are using Go 1.10 and below, install using [dep](https://github.com/golang/dep): {% highlight shell %} $ dep ensure -add github.com/apache/calcite-avatica-go {% endhighlight %} +If you are using Go 1.11 and above, install using Go modules: + +{% highlight shell %} +$ go get github.com/apache/calcite-avatica-go +{% endhighlight %} + + ## Usage The Avatica Go driver implements Go's `database/sql/driver` interface, so, import Go's http://git-wip-us.apache.org/repos/asf/calcite-avatica-go/blob/f5495e1d/site/develop/avatica-go.md ---------------------------------------------------------------------- diff --git a/site/develop/avatica-go.md b/site/develop/avatica-go.md index abf1542..f7e8bce 100644 --- a/site/develop/avatica-go.md +++ b/site/develop/avatica-go.md @@ -69,6 +69,11 @@ PHOENIX_HOST: http://phoenix:8765 ## Releasing If you have not set up a GPG signing key, set one up by following these [instructions](https://www.apache.org/dev/openpgp.html#generate-key). +If this release is a new major version (we are releasing 4.0.0 vs the current version 3.0.0), update the version in the +import path in `go.mod`. + +Since we need to support Go modules, tags must be prefixed with a `v`. For example, tag as `v3.1.0` rather than `3.1.0`. + From the root of the repository, run `./make-release-artifacts.sh`. You will be asked to select the tag to build release artifacts for. The latest tag is automatically selected if no tag is selected.
