From f343fce19423349c957e5a2c866bb5a7a2e5984a Mon Sep 17 00:00:00 2001 From: Mathieu Baudet <1105398+ma2bd@users.noreply.github.com> Date: Tue, 5 Nov 2024 23:55:54 -0500 Subject: [PATCH] allow deployment script to run from the source of the repo (#2825) --- scripts/check_chain_loads.sh | 3 +++ scripts/deploy-validator.sh | 5 +++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/scripts/check_chain_loads.sh b/scripts/check_chain_loads.sh index 70f8c77705e..956b6626651 100755 --- a/scripts/check_chain_loads.sh +++ b/scripts/check_chain_loads.sh @@ -8,6 +8,9 @@ USAGES_FILE="$(mktemp)" +# Make sure we're at the source of the repo. +cd "$(dirname "${BASH_SOURCE[0]}")/.." + grep -R '\<\(create_chain\|load_chain\|load_active_chain\)\>' linera-* > "$USAGES_FILE" # linera-storage contains the implementation of the methods diff --git a/scripts/deploy-validator.sh b/scripts/deploy-validator.sh index b5e47a4cbea..c5fee2dc2ef 100755 --- a/scripts/deploy-validator.sh +++ b/scripts/deploy-validator.sh @@ -2,6 +2,9 @@ set -e +# Make sure we're at the source of the repo. +cd "$(dirname "${BASH_SOURCE[0]}")/.." + # Function to check if a command exists command_exists() { command -v "$1" >/dev/null 2>&1 @@ -51,8 +54,6 @@ GENESIS_URL="https://storage.googleapis.com/linera-io-dev-public/$FORMATTED_BRAN VALIDATOR_CONFIG="docker/validator-config.toml" GENESIS_CONFIG="docker/genesis.json" -cd .. - echo "Building Linera binaries" cargo install --locked --path linera-service