Browse Source

scripts/genproto: use 'gopath.proto' for $GOPATH

Gyu-Ho Lee 9 years ago
parent
commit
8174fcf201
2 changed files with 4 additions and 1 deletions
  1. 1 0
      .gitignore
  2. 3 1
      scripts/genproto.sh

+ 1 - 0
.gitignore

@@ -1,5 +1,6 @@
 /coverage
 /coverage
 /gopath
 /gopath
+/gopath.proto
 /go-bindata
 /go-bindata
 /machine*
 /machine*
 /bin
 /bin

+ 3 - 1
scripts/genproto.sh

@@ -24,7 +24,7 @@ GOGO_PROTO_SHA="5f813990bfffa3c2f4414dbea480e705ab280358"
 GRPC_GATEWAY_SHA="c8ec92d0481dd77d9b8c1808eb6476d190aa039a"
 GRPC_GATEWAY_SHA="c8ec92d0481dd77d9b8c1808eb6476d190aa039a"
 
 
 # set up self-contained GOPATH for building
 # set up self-contained GOPATH for building
-export GOPATH=${PWD}/gopath
+export GOPATH=${PWD}/gopath.proto
 export GOBIN=${PWD}/bin
 export GOBIN=${PWD}/bin
 export PATH="${GOBIN}:${PATH}"
 export PATH="${GOBIN}:${PATH}"
 
 
@@ -76,6 +76,8 @@ protoc -I. \
     --swagger_out=logtostderr=true:./Documentation/dev-guide/apispec/swagger/. \
     --swagger_out=logtostderr=true:./Documentation/dev-guide/apispec/swagger/. \
     ./etcdserver/etcdserverpb/rpc.proto
     ./etcdserver/etcdserverpb/rpc.proto
 
 
+rm -rf ${PWD}/gopath.proto
+
 # TODO: change this whenever we add more swagger API
 # TODO: change this whenever we add more swagger API
 mv \
 mv \
 	Documentation/dev-guide/apispec/swagger/etcdserver/etcdserverpb/rpc.swagger.json \
 	Documentation/dev-guide/apispec/swagger/etcdserver/etcdserverpb/rpc.swagger.json \