From 703699bf7c609d2c1cc68658bda6e887b3fcb8a6 Mon Sep 17 00:00:00 2001 From: uniform64 Date: Mon, 27 Nov 2023 17:10:40 +0800 Subject: [PATCH] add support for docker compose v2 (fix #730) some missing places in the previous commit Signed-off-by: uniform64 --- test-network/addOrg3/addOrg3.sh | 6 +++++- test-network/scripts/createChannel.sh | 6 +++++- test-network/scripts/deployCCAAS.sh | 6 +++++- 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/test-network/addOrg3/addOrg3.sh b/test-network/addOrg3/addOrg3.sh index d21e6d765f..6d0bf7e5d0 100755 --- a/test-network/addOrg3/addOrg3.sh +++ b/test-network/addOrg3/addOrg3.sh @@ -18,7 +18,11 @@ export VERBOSE=false . ../scripts/utils.sh : ${CONTAINER_CLI:="docker"} -: ${CONTAINER_CLI_COMPOSE:="${CONTAINER_CLI}-compose"} +if command -v docker-compose > /dev/null 2>&1; then + : ${CONTAINER_CLI_COMPOSE:="${CONTAINER_CLI}-compose"} +else + : ${CONTAINER_CLI_COMPOSE:="${CONTAINER_CLI} compose"} +fi infoln "Using ${CONTAINER_CLI} and ${CONTAINER_CLI_COMPOSE}" diff --git a/test-network/scripts/createChannel.sh b/test-network/scripts/createChannel.sh index f51bfa9000..6b19281469 100755 --- a/test-network/scripts/createChannel.sh +++ b/test-network/scripts/createChannel.sh @@ -17,7 +17,11 @@ BFT="$5" : ${BFT:=0} : ${CONTAINER_CLI:="docker"} -: ${CONTAINER_CLI_COMPOSE:="${CONTAINER_CLI}-compose"} +if command -v docker-compose > /dev/null 2>&1; then + : ${CONTAINER_CLI_COMPOSE:="${CONTAINER_CLI}-compose"} +else + : ${CONTAINER_CLI_COMPOSE:="${CONTAINER_CLI} compose"} +fi infoln "Using ${CONTAINER_CLI} and ${CONTAINER_CLI_COMPOSE}" if [ ! -d "channel-artifacts" ]; then diff --git a/test-network/scripts/deployCCAAS.sh b/test-network/scripts/deployCCAAS.sh index 13cc009e4d..217dd9c4d8 100755 --- a/test-network/scripts/deployCCAAS.sh +++ b/test-network/scripts/deployCCAAS.sh @@ -24,7 +24,11 @@ VERBOSE=${12:-"false"} CCAAS_SERVER_PORT=9999 : ${CONTAINER_CLI:="docker"} -: ${CONTAINER_CLI_COMPOSE:="${CONTAINER_CLI}-compose"} +if command -v docker-compose > /dev/null 2>&1; then + : ${CONTAINER_CLI_COMPOSE:="${CONTAINER_CLI}-compose"} +else + : ${CONTAINER_CLI_COMPOSE:="${CONTAINER_CLI} compose"} +fi infoln "Using ${CONTAINER_CLI} and ${CONTAINER_CLI_COMPOSE}" println "executing with the following"