From f86fa8b9f38c79c7af24c86345aa614603a5a7c0 Mon Sep 17 00:00:00 2001 From: Jean-Christophe Vanhalle Date: Fri, 31 May 2024 11:07:44 +0200 Subject: [PATCH] checks for checksum instead of date when syncing files --- deploy-directory-to-remote.sh | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/deploy-directory-to-remote.sh b/deploy-directory-to-remote.sh index 0023ce4..534c075 100755 --- a/deploy-directory-to-remote.sh +++ b/deploy-directory-to-remote.sh @@ -38,7 +38,9 @@ if [ "${remote_is_docker}" != "yes" ]; then fi fi -if rsync --compress --delete --delete-excluded --exclude-from="${deployment_exclude_file}" --executability --human-readable --progress --update --recursive "${local_directory_path}/" "${remote_ssh_string}":"${remote_directory_path}"; then +# --update removed after kartolok-child shenaningans +# --checksum added instead +if rsync --checksum --compress --delete --delete-excluded --exclude-from="${deployment_exclude_file}" --executability --human-readable --progress --recursive "${local_directory_path}/" "${remote_ssh_string}":"${remote_directory_path}"; then echo syncing OK else echo syncing NOK @@ -53,3 +55,19 @@ if [ "${remote_is_docker}" != "yes" ]; then exit 1 fi fi + +if [ "${remote_ssh_string}" = "staging" ]; then + set -x + ssh federal sudo service varnish restart + set +x +fi +if [ "${remote_ssh_string}" = "prod" ]; then + set -x + ssh federal sudo service varnish restart + set +x +fi +if [ "${remote_ssh_string}" = "network" ]; then + set -x + ssh network sudo service varnish restart + set +x +fi