diff --git a/script/avs-signing-key.sh b/script/avs-signing-key.sh index 98e715d..35b9afd 100644 --- a/script/avs-signing-key.sh +++ b/script/avs-signing-key.sh @@ -7,7 +7,7 @@ SERVICE_INDEX=${SERVICE_INDEX:-0} SERVICE_ID=`curl -s http://localhost:8000/app | jq -r ".services[${SERVICE_INDEX}].id"` if [ -z "$SERVICE_ID" ] || [ "$SERVICE_ID" == "null" ]; then echo "Error: SERVICE_ID is null or not found for index ${SERVICE_INDEX}." - exit 1 + return fi HD_INDEX=`curl -s http://localhost:8000/service-key/${SERVICE_ID} | jq -rc '.secp256k1.hd_index'` diff --git a/script/build-service.sh b/script/build-service.sh index 1360728..59224ce 100644 --- a/script/build-service.sh +++ b/script/build-service.sh @@ -34,7 +34,7 @@ if [ -z "$WAVS_SERVICE_MANAGER_ADDRESS" ]; then export WAVS_SERVICE_MANAGER_ADDRESS=$(jq -r .addresses.WavsServiceManager ./.nodes/avs_deploy.json) if [ -z "$WAVS_SERVICE_MANAGER_ADDRESS" ]; then echo "WAVS_SERVICE_MANAGER_ADDRESS is not set. Please set it to the address of the service manager." - exit 1 + return fi fi diff --git a/script/create-aggregator.sh b/script/create-aggregator.sh index 3540ba0..073e36e 100644 --- a/script/create-aggregator.sh +++ b/script/create-aggregator.sh @@ -20,7 +20,7 @@ fi SP=""; if [[ "$(uname)" == *"Darwin"* ]]; then SP=" "; fi -cd $(git rev-parse --show-toplevel) || exit 1 +cd $(git rev-parse --show-toplevel) || return mkdir -p .docker @@ -43,7 +43,7 @@ sed -i${SP}'' -e "s/.%%MNEMONIC_REFERENCE%%$/ $AGG_MNEMONIC/" ${ENV_FILENAME} cat > "${AGG_LOC}/start.sh" << EOF #!/bin/bash -cd \$(dirname "\$0") || exit 1 +cd \$(dirname "\$0") || return IMAGE=ghcr.io/lay3rlabs/wavs:35c96a4 INSTANCE=wavs-aggregator-${AGGREGATOR_INDEX} diff --git a/script/create-deployer.sh b/script/create-deployer.sh index 0455ec5..fb003b7 100644 --- a/script/create-deployer.sh +++ b/script/create-deployer.sh @@ -15,7 +15,7 @@ if [ ! -f .env ]; then cp .env.example .env if [ $? -ne 0 ]; then echo "Failed to copy .env.example to .env" - exit 1 + return fi fi diff --git a/script/create-operator.sh b/script/create-operator.sh index 75d8387..ae49224 100644 --- a/script/create-operator.sh +++ b/script/create-operator.sh @@ -2,7 +2,7 @@ SP=""; if [[ "$(uname)" == *"Darwin"* ]]; then SP=" "; fi -cd $(git rev-parse --show-toplevel) || exit 1 +cd $(git rev-parse --show-toplevel) || return mkdir -p .docker @@ -10,7 +10,7 @@ mkdir -p .docker export OPERATOR_INDEX=${OPERATOR_INDEX:-$1} if [ -z "$OPERATOR_INDEX" ]; then echo "Please provide an operator index as the first argument or set OPERATOR_INDEX environment variable." - exit 1 + return fi OPERATOR_LOC=infra/wavs-${OPERATOR_INDEX} @@ -26,7 +26,7 @@ if [ -d "${OPERATOR_LOC}" ] && [ "$(ls -A ${OPERATOR_LOC})" ]; then sudo rm -rf ${OPERATOR_LOC} else echo -e "\nExiting without changes." - exit 1 + return fi fi @@ -52,7 +52,7 @@ rm ${TEMP_FILENAME} # Create startup script cat > "${OPERATOR_LOC}/start.sh" << EOF #!/bin/bash -cd \$(dirname "\$0") || exit 1 +cd \$(dirname "\$0") || return IMAGE=ghcr.io/lay3rlabs/wavs:35c96a4 WAVS_INSTANCE=wavs-${OPERATOR_INDEX} diff --git a/script/get-deploy-status.sh b/script/get-deploy-status.sh index 39322b7..a2e3cc7 100644 --- a/script/get-deploy-status.sh +++ b/script/get-deploy-status.sh @@ -6,7 +6,7 @@ if [ ! -f .env ]; then cp .env.example .env if [ $? -ne 0 ]; then echo "Failed to copy .env.example to .env" - exit 1 + return fi fi diff --git a/script/get-ipfs-gateway.sh b/script/get-ipfs-gateway.sh index f13c4ba..9d26f9f 100644 --- a/script/get-ipfs-gateway.sh +++ b/script/get-ipfs-gateway.sh @@ -10,7 +10,7 @@ elif [ "$DEPLOY_ENV" = "TESTNET" ]; then IPFS_GATEWAY=https://gateway.pinata.cloud/ipfs/ else echo "Unknown DEPLOY_ENV: $DEPLOY_ENV" - exit 1 + return fi echo "${IPFS_GATEWAY}" diff --git a/script/get-registry.sh b/script/get-registry.sh index 743d589..2471c44 100644 --- a/script/get-registry.sh +++ b/script/get-registry.sh @@ -10,7 +10,7 @@ elif [ "$DEPLOY_ENV" = "TESTNET" ]; then REGISTRY=wa.dev else echo "Unknown DEPLOY_ENV: $DEPLOY_ENV" - exit 1 + return fi echo "${REGISTRY}" diff --git a/script/get-rpc.sh b/script/get-rpc.sh index 22b73e0..e0ad65c 100644 --- a/script/get-rpc.sh +++ b/script/get-rpc.sh @@ -10,7 +10,7 @@ elif [ "$DEPLOY_ENV" = "TESTNET" ]; then RPC_URL=$(grep "^TESTNET_RPC_URL=" .env) else echo "Unknown DEPLOY_ENV: $DEPLOY_ENV" - exit 1 + return fi echo "${RPC_URL}" | cut -d '=' -f2 diff --git a/script/get-wasi-namespace.sh b/script/get-wasi-namespace.sh index 1306a0d..20b8670 100644 --- a/script/get-wasi-namespace.sh +++ b/script/get-wasi-namespace.sh @@ -1,7 +1,7 @@ #!/bin/bash if [ -z "$REGISTRY" ]; then - echo "REGISTRY is not set. Please set the REGISTRY environment variable." && exit 1 + echo "REGISTRY is not set. Please set the REGISTRY environment variable." && return fi # === diff --git a/script/upload-to-wasi-registry.sh b/script/upload-to-wasi-registry.sh index 582cf59..2e20c9a 100644 --- a/script/upload-to-wasi-registry.sh +++ b/script/upload-to-wasi-registry.sh @@ -2,22 +2,22 @@ export REGISTRY=`bash ./script/get-registry.sh` if [ -z "$REGISTRY" ]; then - echo "REGISTRY is not set. Please set the REGISTRY environment variable." && exit 1 + echo "REGISTRY is not set. Please set the REGISTRY environment variable." && return fi export PKG_NAMESPACE=`bash ./script/get-wasi-namespace.sh` if [ -z "$PKG_NAMESPACE" ]; then - echo "PKG_NAMESPACE is not set. Please set the PKG_NAMESPACE environment variable." && exit 1 + echo "PKG_NAMESPACE is not set. Please set the PKG_NAMESPACE environment variable." && return fi if [ -z "$PKG_NAME" ]; then - echo "PKG_NAME is not set. Please set the PKG_NAME environment variable." && exit 1 + echo "PKG_NAME is not set. Please set the PKG_NAME environment variable." && return fi if [ -z "$PKG_VERSION" ]; then - echo "PKG_VERSION is not set. Please set the PKG_VERSION environment variable." && exit 1 + echo "PKG_VERSION is not set. Please set the PKG_VERSION environment variable." && return fi if [ -z "$COMPONENT_FILENAME" ]; then - echo "COMPONENT_FILENAME is not set. Please set the COMPONENT_FILENAME environment variable." && exit 1 + echo "COMPONENT_FILENAME is not set. Please set the COMPONENT_FILENAME environment variable." && return fi # ===