mybin

my ~/bin
git clone https://a3nm.net/git/mybin/
Log | Files | Refs | README

commit 836ee603f90fb5521d6b334493580ffd8eefc0cb
parent 278d3b05804f3be8b83b613748b90f4503a3bc04
Author: Antoine Amarilli <a3nm@a3nm.net>
Date:   Fri, 17 Apr 2020 13:20:29 +0200

Merge branch 'master' of a3nm.net:git/mybin

Diffstat:
deploy-sieve | 13+++++++++++--
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" +