toolkit/sync/sync-to-prod.delete.sh

24 lines
598 B
Bash
Raw Normal View History

2022-11-10 18:56:09 +00:00
#!/bin/bash
# Syncs everything from staging to production
2023-01-13 22:36:12 +00:00
if [[ "$RLREL" == "lh" ]] || [[ "$RLREL" == "beta" ]]; then
exit 1
fi
2022-11-10 18:56:09 +00:00
# Source common variables
# shellcheck disable=SC2046,1091,1090
source "$(dirname "$0")/common"
REV=${REVISION}${APPEND_TO_DIR}
2023-05-22 10:32:05 +00:00
cd "${STAGING_ROOT}/${CATEGORY_STUB}" || { echo "Failed to change directory"; ret_val=1; exit 1; }
2022-11-10 18:56:09 +00:00
ret_val=$?
if [ $ret_val -eq "0" ]; then
2023-05-22 23:15:35 +00:00
TARGET="${PRODUCTION_ROOT}/${CATEGORY_STUB}/${REV/-*/}"
2022-11-10 18:56:09 +00:00
mkdir -p "${TARGET}"
rsync_delete_prod "${REV}" "${TARGET}"
2022-11-10 18:56:09 +00:00
echo "Syncing to prod completed. Please run the file list script."
fi