net: net.sh - Enable deploying testnets on debug binaries (#5627)

automerge
This commit is contained in:
Trent Nelson
2019-08-23 19:31:18 -06:00
committed by Grimes
parent 881a6dc0f7
commit 6bb22902cc
2 changed files with 23 additions and 4 deletions

View File

@ -17,6 +17,14 @@ fi
installDir="$(mkdir -p "$1"; cd "$1"; pwd)"
cargoFeatures="$2"
buildProfile="$3"
if [[ -n "$buildProfile" ]]; then
binTargetDir="release"
else
binTargetDir="debug"
fi
echo "Install location: $installDir"
cd "$(dirname "$0")"/..
@ -26,7 +34,7 @@ SECONDS=0
(
set -x
# shellcheck disable=SC2086 # Don't want to double quote $rust_version
cargo $rust_version build --all --release --features="$cargoFeatures"
cargo $rust_version build --all $buildProfile --features="$cargoFeatures"
)
BIN_CRATES=(
@ -53,7 +61,7 @@ for crate in "${BIN_CRATES[@]}"; do
done
for dir in programs/*; do
for program in echo target/release/deps/libsolana_"$(basename "$dir")".{so,dylib,dll}; do
for program in echo target/$binTargetDir/deps/libsolana_"$(basename "$dir")".{so,dylib,dll}; do
if [[ -f $program ]]; then
mkdir -p "$installDir/bin/deps"
rm -f "$installDir/bin/deps/$(basename "$program")"