Skip to content

Commit

Permalink
Make it possible to run startup CI scripts from anywhere
Browse files Browse the repository at this point in the history
those scripts are generally useful to quickly start a wallet and a
accompanying node, this small change make them even more useful by
allowing the user to call them from anywhere.
  • Loading branch information
abailly committed Nov 28, 2024
1 parent af8c9d7 commit d4330ff
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
4 changes: 3 additions & 1 deletion run/common/nix/run-node.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@
# set -euox pipefail
set -euo pipefail

SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )

# shellcheck disable=SC1091
source .env
source ${SCRIPT_DIR}/.env

mkdir -p ./databases

Expand Down
9 changes: 6 additions & 3 deletions run/common/nix/run-wallet.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@
# set -euox pipefail
set -euo pipefail

SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )

# shellcheck disable=SC1091
source .env
source ${SCRIPT_DIR}/.env

mkdir -p ./databases

Expand Down Expand Up @@ -31,7 +33,7 @@ NODE_SOCKET_DIR=${NODE_SOCKET_DIR:=$LOCAL_NODE_SOCKET_DIR}
NODE_SOCKET_PATH=${NODE_SOCKET_DIR}/${NODE_SOCKET_NAME}

# Define and export the local and actual configs directory for the node
LOCAL_NODE_CONFIGS=./configs
LOCAL_NODE_CONFIGS=${SCRIPT_DIR}/configs
NODE_CONFIGS=${NODE_CONFIGS:=$LOCAL_NODE_CONFIGS}


Expand Down Expand Up @@ -68,8 +70,9 @@ else
NETWORK_OPTION="--testnet ${NODE_CONFIGS}/byron-genesis.json"

fi

# shellcheck disable=SC2086
cabal run --project-dir ../../.. -O0 cardano-wallet-exe:exe:cardano-wallet -- \
cabal run --project-dir ${SCRIPT_DIR}/../../.. -O0 cardano-wallet-exe:exe:cardano-wallet -- \
serve \
--log-level DEBUG \
--trace-application DEBUG \
Expand Down

0 comments on commit d4330ff

Please sign in to comment.