fabric-samples/first-network/scripts/step3org3.sh
Arnaud J Le Hors 6007c0974c [FAB-13862] Rename example02 ABstore
Updated chaincode, BYFN, and all other references to example02 to use
the new name ABstore.

Change-Id: I04c177f9de68eb913f4384fd643aa69631143d58
Signed-off-by: Arnaud J Le Hors <lehors@us.ibm.com>
2019-01-30 09:02:23 +01:00

55 lines
1.5 KiB
Bash
Executable file

#!/bin/bash
#
# Copyright IBM Corp. All Rights Reserved.
#
# SPDX-License-Identifier: Apache-2.0
#
# This script is designed to be run in the cli container as the third
# step of the EYFN tutorial. It installs the chaincode as version 2.0
# on peer0.org1 and peer0.org2, and uprage the chaincode on the
# channel to version 2.0, thus completing the addition of org3 to the
# network previously setup in the BYFN tutorial.
#
echo
echo "========= Finish adding Org3 to your first network ========= "
echo
CHANNEL_NAME="$1"
DELAY="$2"
LANGUAGE="$3"
TIMEOUT="$4"
VERBOSE="$5"
: ${CHANNEL_NAME:="mychannel"}
: ${DELAY:="3"}
: ${LANGUAGE:="golang"}
: ${TIMEOUT:="10"}
: ${VERBOSE:="false"}
LANGUAGE=`echo "$LANGUAGE" | tr [:upper:] [:lower:]`
COUNTER=1
MAX_RETRY=5
if [ "$LANGUAGE" = "node" ]; then
CC_SRC_PATH="/opt/gopath/src/github.com/hyperledger/fabric-samples/chaincode/abstore/node/"
elif [ "$LANGUAGE" = "java" ]; then
CC_SRC_PATH="/opt/gopath/src/github.com/hyperledger/fabric-samples/chaincode/abstore/java/"
else
CC_SRC_PATH="github.com/hyperledger/fabric-samples/chaincode/abstore/go/"
fi
# import utils
. scripts/utils.sh
echo "===================== Installing chaincode 2.0 on peer0.org1 ===================== "
installChaincode 0 1 2.0
echo "===================== Installing chaincode 2.0 on peer0.org2 ===================== "
installChaincode 0 2 2.0
echo "===================== Upgrading chaincode on peer0.org1 ===================== "
upgradeChaincode 0 1
echo
echo "========= Finished adding Org3 to your first network! ========= "
echo
exit 0