mirror of
https://github.com/talent-plan/tinykv.git
synced 2024-12-25 20:30:30 +08:00
proto: replace retool by go mod (#359)
This commit is contained in:
parent
54a92ea427
commit
0c877a71bc
@ -25,12 +25,10 @@ if [ -z $(go env GOPATH) ]; then
|
||||
fi
|
||||
GOPATH=$(go env GOPATH)
|
||||
GO_PREFIX_PATH=github.com/pingcap-incubator/tinykv/proto/pkg
|
||||
export PATH=$(pwd)/_tools/bin:$GOPATH/bin:$PATH
|
||||
export PATH=$(pwd)/tools/bin:$GOPATH/bin:$PATH
|
||||
|
||||
echo "install tools..."
|
||||
GO111MODULE=off go get github.com/twitchtv/retool
|
||||
# Ensure we're using the right versions of our tools (see tools.json).
|
||||
GO111MODULE=off retool -base-dir=$(pwd) sync || exit 1
|
||||
cd tools && make && cd ..
|
||||
|
||||
function collect() {
|
||||
file=$(basename $1)
|
||||
|
@ -1,14 +0,0 @@
|
||||
{
|
||||
"Tools": [
|
||||
{
|
||||
"Repository": "github.com/gogo/protobuf/protoc-gen-gofast",
|
||||
"Commit": "636bf0302bc95575d69441b25a2603156ffdddf1"
|
||||
},
|
||||
{
|
||||
"Repository": "golang.org/x/tools/cmd/goimports",
|
||||
"Commit": "04b5d21e00f1f47bd824a6ade581e7189bacde87"
|
||||
}
|
||||
],
|
||||
"RetoolVersion": "1.3.7"
|
||||
}
|
||||
|
1
proto/tools/.gitignore
vendored
Normal file
1
proto/tools/.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
bin/
|
7
proto/tools/Makefile
Normal file
7
proto/tools/Makefile
Normal file
@ -0,0 +1,7 @@
|
||||
all: bin/goimports bin/protoc-gen-gofast
|
||||
|
||||
bin/goimports:
|
||||
go build -o $@ golang.org/x/tools/cmd/goimports
|
||||
|
||||
bin/protoc-gen-gofast:
|
||||
go build -o $@ github.com/gogo/protobuf/protoc-gen-gofast
|
8
proto/tools/go.mod
Normal file
8
proto/tools/go.mod
Normal file
@ -0,0 +1,8 @@
|
||||
module github.com/pingcap-incubator/tinykv/proto/_tools
|
||||
|
||||
require (
|
||||
github.com/gogo/protobuf v1.1.1
|
||||
golang.org/x/tools v0.0.0-20181122213734-04b5d21e00f1
|
||||
)
|
||||
|
||||
go 1.13
|
4
proto/tools/go.sum
Normal file
4
proto/tools/go.sum
Normal file
@ -0,0 +1,4 @@
|
||||
github.com/gogo/protobuf v1.1.1 h1:72R+M5VuhED/KujmZVcIquuo8mBgX4oVda//DQb3PXo=
|
||||
github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
|
||||
golang.org/x/tools v0.0.0-20181122213734-04b5d21e00f1 h1:bsEj/LXbv3BCtkp/rBj9Wi/0Nde4OMaraIZpndHAhdI=
|
||||
golang.org/x/tools v0.0.0-20181122213734-04b5d21e00f1/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
8
proto/tools/mod_guard.go
Normal file
8
proto/tools/mod_guard.go
Normal file
@ -0,0 +1,8 @@
|
||||
// +build modguard
|
||||
|
||||
package tools
|
||||
|
||||
import (
|
||||
_ "github.com/gogo/protobuf/protoc-gen-gofast"
|
||||
_ "golang.org/x/tools/cmd/goimports"
|
||||
)
|
Loading…
Reference in New Issue
Block a user