From 1b4ea4a013b36c0d85ece1de2b87a7528532bee0 Mon Sep 17 00:00:00 2001 From: Titas Date: Wed, 15 Jul 2020 11:35:03 +0300 Subject: [PATCH] Fix deployment of chaincode with higher version than 9 issue This script fails if chaincode version is higher than 9 as 'grep' does not match ex. version equal to '10' Signed-off-by: Titas --- 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 926f7be6..8a61d82a 100755 --- a/test-network/scripts/deployCC.sh +++ b/test-network/scripts/deployCC.sh @@ -185,7 +185,7 @@ queryCommitted() { peer lifecycle chaincode querycommitted --channelID $CHANNEL_NAME --name fabcar >&log.txt res=$? set +x - test $res -eq 0 && VALUE=$(cat log.txt | grep -o '^Version: [0-9], Sequence: [0-9], Endorsement Plugin: escc, Validation Plugin: vscc') + test $res -eq 0 && VALUE=$(cat log.txt | grep -o '^Version: [0-9]\{1,\}, Sequence: [0-9]\{1,\}, Endorsement Plugin: escc, Validation Plugin: vscc') test "$VALUE" = "$EXPECTED_RESULT" && let rc=0 COUNTER=$(expr $COUNTER + 1) done