mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-10 09:11:55 +00:00
deploy.sh: check binary existence before copying to remote
This commit is contained in:
parent
d1455f66c7
commit
3cf92e9f0e
|
@ -118,7 +118,12 @@ make $bin_type-$host_os-$host_arch
|
||||||
# copy the binary to the server
|
# copy the binary to the server
|
||||||
info "deploying..."
|
info "deploying..."
|
||||||
info "copying binary to host $host..."
|
info "copying binary to host $host..."
|
||||||
scp build/bbgo/$bin_type-$host_os-$host_arch $host:$host_bin_dir/bbgo-$tag
|
|
||||||
|
if [[ $(remote_test "-e $host_bin_dir/bbgo-$tag") != "yes" ]] ; then
|
||||||
|
scp build/bbgo/$bin_type-$host_os-$host_arch $host:$host_bin_dir/bbgo-$tag
|
||||||
|
else
|
||||||
|
info "binary $host_bin_dir/bbgo-$tag already exists, we will use the existing one"
|
||||||
|
fi
|
||||||
|
|
||||||
# link binary and restart the systemd service
|
# link binary and restart the systemd service
|
||||||
info "linking binary and restarting..."
|
info "linking binary and restarting..."
|
||||||
|
|
Loading…
Reference in New Issue
Block a user