From e906ae39fbd473dbd4847ac6bac55b490b6ae4cc Mon Sep 17 00:00:00 2001 From: tscrond Date: Thu, 28 Aug 2025 10:22:23 +0200 Subject: [PATCH] standardize connect sidecar version variable to CONNECT_SIDECAR_VERSION in all scripts --- native/mainnet.env.example | 16 ++++++++++++++-- native/v-kit.sh | 19 ++++++++++++------- 2 files changed, 26 insertions(+), 9 deletions(-) diff --git a/native/mainnet.env.example b/native/mainnet.env.example index d3c8eb3..dc1a100 100755 --- a/native/mainnet.env.example +++ b/native/mainnet.env.example @@ -34,13 +34,25 @@ export MEZOD_PUBLIC_IP="" ### Download Link ### # Appropriate link for the mezo package: https://github.com/mezo-org/mezod/releases/download/VERSION/linux-amd64.tar.gz export MEZOD_DOWNLOAD_LINK="" + ### Connect download script ### # Appropriate link for the download script which will be used for connect sidecar installation # Link can be used as a HTTP link (like raw.githubusercontent.com content) or a file # Script detects it automatically # If no connect version defined, it defaults to 'latest' -export CONNECT_VERSION="" -export CONNECT_DOWNLOAD_SCRIPT="" + +### CONNECT SIDECAR - RECOMMENDED PATH ### +# We recommend adding our forked connect download script which interprets CONNECT_SIDECAR_VERSION variable and installs the correct version. +# Official connect sidecar installation script always tries to install the latest Github release which often fails. +# +# Recommended values: +# export CONNECT_SIDECAR_VERSION="v2.1.2" +# export CONNECT_SIDECAR_SCRIPT=https//raw.githubusercontent.com/mezo-org/validator-kit/refs/heads/main/native/install-connect.sh +# or local path to this script: +# export CONNECT_SIDECAR_SCRIPT=./install-connect.sh + +export CONNECT_SIDECAR_VERSION="" +export CONNECT_DOWNLOAD_SCRIPT="" ### P2P Config ### # Default. It should be changed in case of a custom setup diff --git a/native/v-kit.sh b/native/v-kit.sh index 6923b53..4394b22 100755 --- a/native/v-kit.sh +++ b/native/v-kit.sh @@ -80,26 +80,31 @@ install_mezo() { } install_skip() { + + # Strip the version symbol from 'v' + CONNECT_SIDECAR_VERSION=${CONNECT_SIDECAR_VERSION#v} + echo "Installing Connect Sidecar version: $CONNECT_SIDECAR_VERSION" + # Empty version defaults to latest - if [[ -z "${CONNECT_VERSION}" ]]; then - CONNECT_VERSION="2.1.2" + if [[ -z "${CONNECT_SIDECAR_VERSION}" ]]; then + CONNECT_SIDECAR_VERSION="2.1.2" fi - # Empty download script link defaults to official connect sidecar install script + # Empty download script link defaults to forked version of connect sidecar install script if [[ -z "${CONNECT_DOWNLOAD_SCRIPT}" ]]; then CONNECT_DOWNLOAD_SCRIPT="./install-connect.sh" fi if [[ -f "${CONNECT_DOWNLOAD_SCRIPT}" ]]; then - cat ${CONNECT_DOWNLOAD_SCRIPT} | CONNECT_SIDECAR_VERSION=${CONNECT_VERSION} bash + cat ${CONNECT_DOWNLOAD_SCRIPT} | CONNECT_SIDECAR_VERSION=${CONNECT_SIDECAR_VERSION} bash else - curl -ksSL ${CONNECT_DOWNLOAD_SCRIPT} | CONNECT_SIDECAR_VERSION=${CONNECT_VERSION} bash + curl -ksSL ${CONNECT_DOWNLOAD_SCRIPT} | CONNECT_SIDECAR_VERSION=${CONNECT_SIDECAR_VERSION} bash fi CONNECT_TMP=$(which connect) - CONNECT_VERSION=$(${CONNECT_TMP} version) + CONNECT_SIDECAR_VERSION=$(${CONNECT_TMP} version) - CONNECT_EXEC_PATH=$MEZOD_HOME/bin/skip-${CONNECT_VERSION} + CONNECT_EXEC_PATH=$MEZOD_HOME/bin/skip-${CONNECT_SIDECAR_VERSION} CONNECT_EXEC=$CONNECT_EXEC_PATH/connect mkdir -p $CONNECT_EXEC_PATH