Ensure CSS updates after deploy

This commit is contained in:
2026-01-27 11:09:20 +01:00
parent 7a4ce8609c
commit 43fc752535
4 changed files with 36 additions and 2 deletions

View File

@@ -9,10 +9,12 @@ set -euo pipefail
# ./deploy.sh --dry-run # show what would change
# ./deploy.sh /path/to/luxtools
# ./deploy.sh --no-delete # don't delete extraneous files at target
# ./deploy.sh --preserve-times # keep source mtimes at target
TARGET="/thebe/Web/lib/plugins/luxtools"
DRY_RUN=0
DELETE=1
PRESERVE_TIMES=0
while (($#)); do
case "$1" in
@@ -24,6 +26,10 @@ while (($#)); do
DELETE=0
shift
;;
--preserve-times)
PRESERVE_TIMES=1
shift
;;
-h|--help)
sed -n '1,80p' "$0"
exit 0
@@ -79,6 +85,13 @@ RSYNC_ARGS=(
--exclude=.DS_Store
)
# DokuWiki's combined CSS (lib/exe/css.php) is cached and invalidated based on source file mtimes.
# When deploying to a mounted/remote filesystem with a different clock, preserving mtimes can make
# DokuWiki think the cache is always newer than your plugin CSS. Avoid that by default.
if (( ! PRESERVE_TIMES )); then
RSYNC_ARGS+=(--no-times --omit-dir-times)
fi
if ((DRY_RUN)); then
RSYNC_ARGS+=(--dry-run)
fi