2020-05-09 17:53:17 +00:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
2020-06-07 14:03:12 +00:00
|
|
|
# SPDX-FileCopyrightText: 2020 Luke Granger-Brown <depot@lukegb.com>
|
|
|
|
#
|
|
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
|
2020-05-09 17:53:17 +00:00
|
|
|
set -euo pipefail
|
|
|
|
|
2020-05-09 23:20:10 +00:00
|
|
|
./hack/populate_secrets.sh
|
2020-05-09 17:53:17 +00:00
|
|
|
|
2020-05-09 23:12:25 +00:00
|
|
|
ssh_cmd="ssh -o StrictHostKeyChecking=accept-new"
|
|
|
|
|
|
|
|
if [ ! -z ${2+x} ]; then ssh_cmd="$ssh_cmd $2"; fi
|
2020-05-09 17:53:17 +00:00
|
|
|
|
|
|
|
echo Syncing repo content to machine "$1"
|
|
|
|
rsync -e "$ssh_cmd" -avz --exclude='.hg/' ./ "deployer@$1:depot/"
|
|
|
|
|
|
|
|
echo Triggering rebuild
|
2020-06-07 14:03:12 +00:00
|
|
|
$ssh_cmd -t "deployer@$1" rebuilder ./depot
|