fix: derive default release channel from package.json

This commit is contained in:
Michael Vines
2018-11-30 07:49:40 -08:00
parent 7437c3f694
commit 96133216e5

View File

@ -1,6 +1,8 @@
#!/usr/bin/env bash #!/usr/bin/env bash
set -e set -e
channel=$(cd "$(dirname "$0")"; node -p 'require("../package.json")["solana-channel"]')
usage() { usage() {
exitcode=0 exitcode=0
if [[ -n "$1" ]]; then if [[ -n "$1" ]]; then
@ -24,7 +26,9 @@ Operate a local testnet
update/up-specific options: update/up-specific options:
edge - Update/start the "edge" channel network 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: down-specific options:
none none
@ -42,8 +46,6 @@ EOF
cmd="$1" cmd="$1"
shift shift
channel=beta
docker --version || usage "It appears that docker is not installed" docker --version || usage "It appears that docker is not installed"
case $cmd in case $cmd in
update) update)