From 1671e494d38d2e072505b67cd39eef3a1bc8bc32 Mon Sep 17 00:00:00 2001 From: c9s Date: Sun, 7 Aug 2022 11:27:27 +0800 Subject: [PATCH] deploy.sh: add UPLOAD_ONLY option --- deploy.sh | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/deploy.sh b/deploy.sh index 0cdc48f5f..89435a72b 100755 --- a/deploy.sh +++ b/deploy.sh @@ -168,8 +168,13 @@ else info "binary $host_bin_dir/bbgo-$tag already exists, we will use the existing one" fi -# link binary and restart the systemd service -info "linking binary and restarting..." -ssh $host "(cd $target && ln -sf \$HOME/$host_bin_dir/bbgo-$tag bbgo && sudo systemctl restart $target.service)" +if [[ -n "$UPLOAD_ONLY" ]] ; then + # link binary and restart the systemd service + info "linking binary" + ssh $host "(cd $target && ln -sf \$HOME/$host_bin_dir/bbgo-$tag bbgo)" +else + info "linking binary and restarting..." + ssh $host "(cd $target && ln -sf \$HOME/$host_bin_dir/bbgo-$tag bbgo && sudo systemctl restart $target.service)" +fi info "deployed successfully!"