blob: 27cd0c43e729a9d21923d34bc98ad4476ac7750e [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 -07007# TODO: Once we dropped support to go 1.15, add "@v1.5.0" suffix to go install
8GO111MODULE=on go install -mod=mod github.com/golang/mock/mockgen
9
10`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
11
Yuxuan 'fishy' Wangfb539ae2021-08-09 14:27:48 -070012chmod a+w -R $GOPATH && rm -Rf $GOPATH