Enable cargo features to be specified

This commit is contained in:
Michael Vines 2018-09-04 23:01:07 -07:00
parent aaf0a23134
commit 48c19d3100
1 changed files with 8 additions and 3 deletions

View File

@ -23,8 +23,9 @@ Operate a configured testnet
restart - Shortcut for stop then start restart - Shortcut for stop then start
start-specific options: start-specific options:
-S snapFilename - Deploy the specified Snap file -S [snapFilename] - Deploy the specified Snap file
-s edge|beta|stable - Deploy the latest Snap on the specified Snap release channel -s edge|beta|stable - Deploy the latest Snap on the specified Snap release channel
-f [cargoFeatures] - List of |cargo --feaures=| to activate
Note: if RUST_LOG is set in the environment it will be propogated into the Note: if RUST_LOG is set in the environment it will be propogated into the
network nodes. network nodes.
@ -44,12 +45,13 @@ snapChannel=
snapFilename= snapFilename=
deployMethod=local deployMethod=local
sanityExtraArgs= sanityExtraArgs=
cargoFeatures=
command=$1 command=$1
[[ -n $command ]] || usage [[ -n $command ]] || usage
shift shift
while getopts "h?S:s:o:" opt; do while getopts "h?S:s:o:f:" opt; do
case $opt in case $opt in
h | \?) h | \?)
usage usage
@ -70,6 +72,9 @@ while getopts "h?S:s:o:" opt; do
;; ;;
esac esac
;; ;;
f)
cargoFeatures=$OPTARG
;;
o) o)
case $OPTARG in case $OPTARG in
noLedgerVerify|noValidatorSanity) noLedgerVerify|noValidatorSanity)
@ -102,7 +107,7 @@ build() {
set -x set -x
rm -rf farf rm -rf farf
$MAYBE_DOCKER cargo install --root farf $MAYBE_DOCKER cargo install --features="$cargoFeatures" --root farf
) )
echo "Build took $SECONDS seconds" echo "Build took $SECONDS seconds"
} }