hack/deploy: sync parts of the hg repo

This commit is contained in:
Luke Granger-Brown 2021-01-11 18:35:22 +00:00
parent 9dd18e2cdc
commit 57aa87b92e
2 changed files with 4 additions and 3 deletions

View file

@ -13,7 +13,7 @@ ssh_cmd="ssh -o StrictHostKeyChecking=accept-new"
if [ ! -z ${2+x} ]; then ssh_cmd="$ssh_cmd $2"; fi
echo Syncing repo content to machine "$1"
rsync -e "$ssh_cmd" -avz --exclude='.hg/' ./ "deployer@$1:depot/"
rsync -e "$ssh_cmd" -avz --exclude='.hg/store/data/' --exclude='.hg/store/da/' --exclude='.hg/cache/' --exclude='.hg/wcache/' ./ "deployer@$1:depot/"
echo Triggering rebuild
$ssh_cmd -t "deployer@$1" rebuilder ./depot

View file

@ -6,10 +6,11 @@ let
HG_REPO = hgRepo;
MERCURIAL = pkgs.mercurial;
} ''
export HGPLAIN=
mytmp=$(mktemp -d)
pushd $mytmp
ln -s $HG_REPO .hg
echo -n "depot-$($MERCURIAL/bin/hg id --id | tr -d '+')" > $out
echo -n "depot-$($MERCURIAL/bin/hg id --id -r.)" > $out
popd
rm -rf $mytmp
'';