Add support for deploying from non-Linux machines

This commit is contained in:
Michael Vines
2018-08-28 20:55:13 -07:00
parent c81c19234f
commit ff991b87da

View File

@ -41,9 +41,9 @@ done
loadConfigFile loadConfigFile
build() { build() {
declare MAYBE_DOCKER=
if [[ $(uname) != Linux ]]; then if [[ $(uname) != Linux ]]; then
echo "Unable to build, this isn't a Linux system" MAYBE_DOCKER="ci/docker-run.sh solanalabs/rust"
exit 1
fi fi
SECONDS=0 SECONDS=0
( (
@ -51,9 +51,9 @@ build() {
echo "****************" echo "****************"
echo "Build started at $(date)" echo "Build started at $(date)"
# Build and install locally set -x
PATH="$HOME"/.cargo/bin:"$PATH" rm -rf farf
cargo install --force $MAYBE_DOCKER cargo install --root farf
) )
echo "Build took $SECONDS seconds" echo "Build took $SECONDS seconds"
} }
@ -90,7 +90,7 @@ startLeader() {
( (
set -x set -x
rsync -vPrz -e "ssh ${sshOptions[*]}" ~/.cargo/bin/solana* "$ipAddress":~/.cargo/bin/ rsync -vPrz -e "ssh ${sshOptions[*]}" "$SOLANA_ROOT"/farf/bin/* "$ipAddress":~/.cargo/bin/
ssh "${sshOptions[@]}" -f "$ipAddress" \ ssh "${sshOptions[@]}" -f "$ipAddress" \
"./solana/net/remote/remote_leader.sh" "./solana/net/remote/remote_leader.sh"
) >> "$logFile" ) >> "$logFile"