Fund solana-install deployments from the mint keypair to avoid airdrops (#4997)
This commit is contained in:
parent
0a949677f0
commit
32b55e6703
|
@ -34,4 +34,6 @@ loadConfigFile
|
||||||
PATH="$HOME"/.cargo/bin:"$PATH"
|
PATH="$HOME"/.cargo/bin:"$PATH"
|
||||||
|
|
||||||
set -x
|
set -x
|
||||||
scripts/solana-install-deploy.sh localhost "$releaseChannel" "$updatePlatform"
|
scripts/solana-install-deploy.sh \
|
||||||
|
--keypair config-local/mint-keypair.json \
|
||||||
|
localhost "$releaseChannel" "$updatePlatform"
|
||||||
|
|
|
@ -5,6 +5,17 @@
|
||||||
set -e
|
set -e
|
||||||
SOLANA_ROOT="$(cd "$(dirname "$0")"/..; pwd)"
|
SOLANA_ROOT="$(cd "$(dirname "$0")"/..; pwd)"
|
||||||
|
|
||||||
|
maybeKeypair=
|
||||||
|
while [[ ${1:0:2} = -- ]]; do
|
||||||
|
if [[ $1 = --keypair && -n $2 ]]; then
|
||||||
|
maybeKeypair="$1 $2"
|
||||||
|
shift 2
|
||||||
|
else
|
||||||
|
echo "Error: Unknown option: $1"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
URL=$1
|
URL=$1
|
||||||
TAG=$2
|
TAG=$2
|
||||||
OS=${3:-linux}
|
OS=${3:-linux}
|
||||||
|
@ -60,8 +71,12 @@ esac
|
||||||
PATH="$SOLANA_ROOT"/target/debug:$PATH
|
PATH="$SOLANA_ROOT"/target/debug:$PATH
|
||||||
|
|
||||||
set -x
|
set -x
|
||||||
balance=$(solana-wallet --url "$URL" balance)
|
# shellcheck disable=SC2086 # Don't want to double quote $maybeKeypair
|
||||||
|
balance=$(solana-wallet $maybeKeypair --url "$URL" balance)
|
||||||
if [[ $balance = "0 lamports" ]]; then
|
if [[ $balance = "0 lamports" ]]; then
|
||||||
solana-wallet --url "$URL" airdrop 42
|
# shellcheck disable=SC2086 # Don't want to double quote $maybeKeypair
|
||||||
|
solana-wallet $maybeKeypair --url "$URL" airdrop 42
|
||||||
fi
|
fi
|
||||||
solana-install deploy --url "$URL" "$DOWNLOAD_URL" update_manifest_keypair.json
|
|
||||||
|
# shellcheck disable=SC2086 # Don't want to double quote $maybeKeypair
|
||||||
|
solana-install deploy $maybeKeypair --url "$URL" "$DOWNLOAD_URL" update_manifest_keypair.json
|
||||||
|
|
|
@ -1,11 +1,7 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
#
|
#
|
||||||
# Convenience script to easily deploy a software update to a testnet
|
# Creates update_manifest_keypair.json based on the current platform and
|
||||||
#
|
# environment
|
||||||
# Prerequisites:
|
|
||||||
# 1) The default keypair should have some lamports (eg, `solana-wallet airdrop 123`)
|
|
||||||
# 2) The file update_manifest_keypair.json should exist if this script is not
|
|
||||||
# run from the CI environment
|
|
||||||
#
|
#
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue