From 53707ce43b13c2d924c7c1fdce411936e8ca4eae Mon Sep 17 00:00:00 2001 From: tiancaiamao Date: Mon, 14 Jan 2019 17:19:07 +0800 Subject: [PATCH] *: tiny update CONTRIBUTING.md (#8814) --- CONTRIBUTING.md | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index eed7fbd2b1279..e85f876ea743c 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -63,8 +63,25 @@ please [set one up](http://golang.org/doc/code.html). The version of GO should be **1.11** or above. -After installation, you'll need `GOPATH` defined, -and `PATH` modified to access your Go binaries. +After installation, there are two ways to build TiDB binary. + +#### For a quick taste + +The `GOPATH` is not necessary. + +``` +mkdir tmp +cd tmp +echo 'module tidb' > go.mod +GO111MODULE=on go get github.com/pingcap/tidb@c385cbdcca83eeed283139814a7ea149e3116e66 +GO111MODULE=on go build -o tidb-server github.com/pingcap/tidb/tidb-server +``` + +The `c385cbdcca83eeed283139814a7ea149e3116e66` can be changed to any other commit hash. Try the latest commit hash [here](https://github.com/pingcap/tidb/commits/master). + +#### For development + +You'll need `GOPATH` defined, and `PATH` modified to access your Go binaries. A common setup is the following but you could always google a setup for your own flavor.