fix mockgen script

We don't need to copy the vendor directory.
This commit is contained in:
Marten Seemann
2018-08-11 11:25:42 +07:00
parent a964f2d2ff
commit 40050f558d

View File

@@ -8,8 +8,7 @@ TEMP_DIR=$(mktemp -d)
mkdir -p $TEMP_DIR/src/github.com/lucas-clemente/quic-go/
# copy all .go files to a temporary directory
# golang.org/x/crypto/curve25519/ uses Go compiler directives, which is confusing to mockgen
rsync -r --exclude 'vendor/golang.org/x/crypto/curve25519/' --include='*.go' --include '*/' --exclude '*' $GOPATH/src/github.com/lucas-clemente/quic-go/ $TEMP_DIR/src/github.com/lucas-clemente/quic-go/
rsync -r --exclude 'vendor' --include='*.go' --include '*/' --exclude '*' $GOPATH/src/github.com/lucas-clemente/quic-go/ $TEMP_DIR/src/github.com/lucas-clemente/quic-go/
echo "type $5 = $4" >> $TEMP_DIR/src/github.com/lucas-clemente/quic-go/interface.go
export GOPATH="$TEMP_DIR:$GOPATH"