commit 54667a81f7bf5c99e2d01ea6b8308b3091d86ef0
parent 04f391752428b75828ca6510bd5e56487e3fa7c5
Author: Antoine Amarilli <a3nm@a3nm.net>
Date: Tue, 14 Apr 2020 21:13:57 +0200
update sieve deployment script to new setup
Diffstat:
1 file changed, 11 insertions(+), 2 deletions(-)
diff --git a/deploy-sieve b/deploy-sieve
@@ -2,10 +2,12 @@
# Deploy sieve folder $1 to remote location $2 but check it passes tests
-LOCATION="$2"
+set -e
+
SCRIPT="$1/main.sieve"
TESTS="$1/test.dat"
CONFIG="$1/dovecot.conf"
+MACHINE="$2"
grep -v '^#' "$TESTS" | while read test
do
@@ -33,5 +35,12 @@ if [[ $? -eq 1 ]]; then
fi
echo "Passed all tests: `wc -l $TESTS`"
-rsync -av "$1/" "$LOCATION/"
+
+cd "$1"
+git commit -m 'update sieve' *.sieve
+git push
+ssh "$MACHINE" "cd $1; git pull"
+ssh "$MACHINE" "sudo service dovecot reload"
+echo "sieve deployment successful"
+