[FAB-16198] Run "go mod vendor" for FabCar Go contract

FAB-15782 added go.mod files for versioned dependencies,
but "go mod vendor" is never run before deploying the
FabCar Go contract either by the user or in CI.

Signed-off-by: Simon Stone <sstone1@uk.ibm.com>
Change-Id: I958d426ca72938a2051bf95d6ecc4c6e3cd1d7b2
This commit is contained in:
Simon Stone 2019-08-02 14:58:28 +01:00
parent 3996db59dc
commit b6380cc88c

View file

@ -15,6 +15,11 @@ CC_SRC_LANGUAGE=`echo "$CC_SRC_LANGUAGE" | tr [:upper:] [:lower:]`
if [ "$CC_SRC_LANGUAGE" = "go" -o "$CC_SRC_LANGUAGE" = "golang" ]; then
CC_RUNTIME_LANGUAGE=golang
CC_SRC_PATH=github.com/hyperledger/fabric-samples/chaincode/fabcar/go
echo Vendoring Go dependencies ...
pushd ../chaincode/fabcar/go
GO111MODULE=on go mod vendor
popd
echo Finished vendoring Go dependencies
elif [ "$CC_SRC_LANGUAGE" = "java" ]; then
CC_RUNTIME_LANGUAGE=java
CC_SRC_PATH=/opt/gopath/src/github.com/hyperledger/fabric-samples/chaincode/fabcar/java