From ed38b676265b8204dc98ac16f82ddf1b6ef2d63b Mon Sep 17 00:00:00 2001 From: Louis Abel Date: Fri, 19 May 2023 11:30:50 -0700 Subject: [PATCH] add missing dry run flags --- sync/common | 11 +++++++---- sync/sync-to-prod.sh | 2 +- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/sync/common b/sync/common index aac8af0..76823c3 100644 --- a/sync/common +++ b/sync/common @@ -160,7 +160,7 @@ function perform_hardlink() { # dry rsync function rsync_no_delete_staging_dry() { local TARGET="${1}" - sudo -l && rsync -vrlptDSHog --chown=10004:10005 --progress --human-readable compose/ "${TARGET}" + sudo -l && rsync -vrlptDSHog --chown=10004:10005 --progress --human-readable --dry-run compose/ "${TARGET}" } function rsync_no_delete_staging_pungi_dry() { @@ -179,6 +179,7 @@ function rsync_no_delete_staging_pungi_dry() { --exclude COMMUNITY-CHARTER \ --exclude extra_files.json \ --exclude Minimal \ + --dry-run \ compose/ "${TARGET}" } @@ -188,6 +189,7 @@ function rsync_no_delete_staging_with_excludes_dry() { sudo -l && rsync -vrlptDSHog --chown=10004:10005 --progress --human-readable \ --exclude "${EXCLUDE}" \ --exclude Minimal \ + --dry-run \ compose/ "${TARGET}" } @@ -197,24 +199,25 @@ function rsync_delete_staging_with_excludes_dry() { sudo -l && rsync -vrlptDSHog --chown=10004:10005 --progress --human-readable \ --exclude "${EXCLUDE}" \ --exclude Minimal \ + --dry-run \ compose/ "${TARGET}" } function rsync_no_delete_prod_dry() { local REV="${1}" local TARGET="${2}" - sudo -l && rsync -vrlptDSHog --chown=10004:10005 --progress --human-readable "${REV}/" "${TARGET}" + sudo -l && rsync -vrlptDSHog --chown=10004:10005 --progress --human-readable --dry-run "${REV}/" "${TARGET}" } function rsync_delete_staging_dry() { local TARGET="${1}" - sudo -l && rsync -vrlptDSHog --chown=10004:10005 --progress --human-readable --delete compose/ "${TARGET}" + sudo -l && rsync -vrlptDSHog --chown=10004:10005 --progress --human-readable --delete --dry-run compose/ "${TARGET}" } function rsync_delete_prod_dry() { local REV="${1}" local TARGET="${2}" - sudo -l && rsync -vrlptDSHog --chown=10004:10005 --progress --human-readable --delete "${REV}/" "${TARGET}" + sudo -l && rsync -vrlptDSHog --chown=10004:10005 --progress --human-readable --delete --dry-run "${REV}/" "${TARGET}" } diff --git a/sync/sync-to-prod.sh b/sync/sync-to-prod.sh index 1268c7a..16428e0 100644 --- a/sync/sync-to-prod.sh +++ b/sync/sync-to-prod.sh @@ -11,7 +11,7 @@ source "$(dirname "$0")/common" REV=${REVISION}${APPEND_TO_DIR} -cd "${STAGING_ROOT}/${CATEGORY_STUB}/${REV}" || { echo "Failed to change directory"; ret_val=1; exit 1; } +cd "${STAGING_ROOT}/${CATEGORY_STUB}" || { echo "Failed to change directory"; ret_val=1; exit 1; } ret_val=$? if [ $ret_val -eq "0" ]; then