From 0031db5de282eb61a57d774a5dd8e12de79aa076 Mon Sep 17 00:00:00 2001 From: Titas Date: Thu, 6 Aug 2020 23:59:25 +0300 Subject: [PATCH] Fix deployment of chaincode with higher version than 9 issue (#243) This script fails if chaincode version is higher than 9 as 'grep' does not match ex. version equal to '10' Signed-off-by: Titas Signed-off-by: lehors Co-authored-by: Arnaud J Le Hors --- test-network/scripts/deployCC.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test-network/scripts/deployCC.sh b/test-network/scripts/deployCC.sh index 6f5ed46e..10cfa1ce 100755 --- a/test-network/scripts/deployCC.sh +++ b/test-network/scripts/deployCC.sh @@ -269,7 +269,7 @@ queryCommitted() { peer lifecycle chaincode querycommitted --channelID $CHANNEL_NAME --name ${CC_NAME} >&log.txt res=$? set +x - test $res -eq 0 && VALUE=$(cat log.txt | grep -o '^Version: '$CC_VERSION', Sequence: [0-9], Endorsement Plugin: escc, Validation Plugin: vscc') + test $res -eq 0 && VALUE=$(cat log.txt | grep -o '^Version: '$CC_VERSION', Sequence: [0-9]*, Endorsement Plugin: escc, Validation Plugin: vscc') test "$VALUE" = "$EXPECTED_RESULT" && let rc=0 COUNTER=$(expr $COUNTER + 1) done