blob: 4958783d074b90ab3d66ac8d2b8854825c45a285 [file] [log] [blame]
D. Can Celasune0e1a082019-05-10 09:18:11 +02001#!/bin/sh
Yuxuan 'fishy' Wangb71f11e2021-03-22 15:01:00 -07002
D. Can Celasune0e1a082019-05-10 09:18:11 +02003set -e
4
Yuxuan 'fishy' Wangb71f11e2021-03-22 15:01:00 -07005export GOPATH=$(mktemp -d -t gopath-XXXXXXXXXX)
D. Can Celasune0e1a082019-05-10 09:18:11 +02006
Yuxuan 'fishy' Wangb71f11e2021-03-22 15:01:00 -07007GO111MODULE=on go install -mod=mod github.com/golang/mock/mockgen
8
9`go env GOPATH`/bin/mockgen -build_flags "-mod=mod" -destination=src/common/mock_handler.go -package=common github.com/apache/thrift/test/go/src/gen/thrifttest ThriftTest
10
Yuxuan 'fishy' Wangfb539ae2021-08-09 14:27:48 -070011chmod a+w -R $GOPATH && rm -Rf $GOPATH