From 96133216e50283f819b925c1522c4c38cb879aaf Mon Sep 17 00:00:00 2001 From: Michael Vines Date: Fri, 30 Nov 2018 07:49:40 -0800 Subject: [PATCH] fix: derive default release channel from package.json --- web3.js/bin/localnet.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/web3.js/bin/localnet.sh b/web3.js/bin/localnet.sh index 3fe994246c..0addc57e2d 100755 --- a/web3.js/bin/localnet.sh +++ b/web3.js/bin/localnet.sh @@ -1,6 +1,8 @@ #!/usr/bin/env bash set -e +channel=$(cd "$(dirname "$0")"; node -p 'require("../package.json")["solana-channel"]') + usage() { exitcode=0 if [[ -n "$1" ]]; then @@ -24,7 +26,9 @@ Operate a local testnet update/up-specific options: edge - Update/start the "edge" channel network - beta - Update/start the "beta" channel network (default) + beta - Update/start the "beta" channel network + + Default channel: $channel down-specific options: none @@ -42,8 +46,6 @@ EOF cmd="$1" shift -channel=beta - docker --version || usage "It appears that docker is not installed" case $cmd in update)