From ea76d837855ca113e4e073a2715eb7264799e7f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrej=20Buko=C5=A1ek?= Date: Tue, 9 Jul 2024 13:09:45 +0200 Subject: [PATCH] fix: Fix sapphire-localnet startup on Mac Docker --- docker/common/start.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/docker/common/start.sh b/docker/common/start.sh index b25507c9..755612a7 100755 --- a/docker/common/start.sh +++ b/docker/common/start.sh @@ -11,8 +11,6 @@ # - BEACON_BACKEND: beacon epoch transition mode 'mock' (default) or 'default' # - OASIS_SINGLE_COMPUTE_NODE: (default: true) if non-empty only run a single compute node -set -euo pipefail - export OASIS_DOCKER_NO_GATEWAY=${OASIS_DOCKER_NO_GATEWAY:-no} export OASIS_NODE_LOG_LEVEL=${OASIS_NODE_LOG_LEVEL:-warn} @@ -21,10 +19,12 @@ export OASIS_DOCKER_USE_TIMESTAMPS_IN_NOTICES=${OASIS_DOCKER_USE_TIMESTAMPS_IN_N export OASIS_DOCKER_DEBUG_DISK_AND_CPU_USAGE=${OASIS_DOCKER_DEBUG_DISK_AND_CPU_USAGE:-no} -export OASIS_SINGLE_COMPUTE_NODE=${OASIS_SINGLE_COMPUTE_NODE-1} +export OASIS_SINGLE_COMPUTE_NODE=${OASIS_SINGLE_COMPUTE_NODE:-1} + OASIS_WEB3_GATEWAY_VERSION=$(${OASIS_WEB3_GATEWAY} -v | head -n1 | cut -d " " -f 3 | sed -r 's/^v//') OASIS_CORE_VERSION=$(${OASIS_NODE} -v | head -n1 | cut -d " " -f 3 | sed -r 's/^v//') VERSION=$(cat /VERSION) + echo "${PARATIME_NAME}-localnet ${VERSION} (oasis-core: ${OASIS_CORE_VERSION}, ${PARATIME_NAME}-paratime: ${PARATIME_VERSION}, oasis-web3-gateway: ${OASIS_WEB3_GATEWAY_VERSION})" echo @@ -36,6 +36,8 @@ OASIS_KM_SOCKET=${OASIS_NODE_DATADIR}/net-runner/network/keymanager-0/internal.s OASIS_WEB3_GATEWAY_PID="" OASIS_NODE_PID="" +set -euo pipefail + function cleanup { if [[ -n "${OASIS_WEB3_GATEWAY_PID}" ]]; then kill -9 ${OASIS_WEB3_GATEWAY_PID}