Skip to content

Commit

Permalink
scripts: have genproto.sh clean up after itself
Browse files Browse the repository at this point in the history
We don't want it to leave gopath.proto around for reasons detailed in
the previous commit (messing up vgo).
  • Loading branch information
tbg committed Jul 16, 2019
1 parent 5a734e7 commit 855da1d
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion scripts/genproto.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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}"

Expand Down

0 comments on commit 855da1d

Please sign in to comment.