mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
scripts: have genproto.sh clean up after itself
We don't want it to leave gopath.proto around for reasons detailed in the previous commit (messing up vgo).
This commit is contained in:
@@ -38,7 +38,14 @@ SCHWAG_ROOT="${GOPATH}/src/github.com/hexfusion/schwag"
|
||||
GOGOPROTO_PATH="${GOGOPROTO_ROOT}:${GOGOPROTO_ROOT}/protobuf"
|
||||
GRPC_GATEWAY_ROOT="${GOPATH}/src/github.com/grpc-ecosystem/grpc-gateway"
|
||||
|
||||
rm -f "${ETCD_ROOT}"
|
||||
function cleanup {
|
||||
# Remove the whole fake GOPATH which can really confuse go mod.
|
||||
rm -rf "${PWD}/gopath.proto"
|
||||
}
|
||||
|
||||
cleanup
|
||||
trap cleanup EXIT
|
||||
|
||||
mkdir -p "${ETCD_IO_ROOT}"
|
||||
ln -s "${PWD}" "${ETCD_ROOT}"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user