deploy: erase twig cache before rsyncing files
This commit is contained in:
parent
b7d83ef8fe
commit
80c40fcee8
@ -44,6 +44,11 @@ $PHP "$DIR"/gen_static_config.php -i "$STAGING_DIR/htdocs" > "$STAGING_DIR/confi
|
|||||||
|
|
||||||
cd "$DIR"
|
cd "$DIR"
|
||||||
|
|
||||||
|
TWIG_CACHE_DIR=$(grep 'skin_cache_prod_dir:' "$DEV_DIR/config.yaml" | sed 's/.*skin_cache_prod_dir: *//' | tr -d '[:space:]')
|
||||||
|
if [ -d "TWIG_CACHE_DIR" ]; then
|
||||||
|
find "$TWIG_CACHE_DIR" -maxdepth 1 -not -path "$TWIG_CACHE_DIR" -exec rm -rf {} +
|
||||||
|
fi
|
||||||
|
|
||||||
# copy staging to prod
|
# copy staging to prod
|
||||||
rsync -a --delete --delete-excluded --info=progress2 "$STAGING_DIR/" "$PROD_DIR/" \
|
rsync -a --delete --delete-excluded --info=progress2 "$STAGING_DIR/" "$PROD_DIR/" \
|
||||||
--exclude .git \
|
--exclude .git \
|
||||||
|
Loading…
x
Reference in New Issue
Block a user