added new browser tests for editor, now with pathched tests

This commit is contained in:
Mark Gregory
2026-06-25 08:13:29 +01:00
parent 41d0c9b2d1
commit 83e7edc953
+22 -36
View File
@@ -1,44 +1,25 @@
#!/usr/bin/env bash #!/usr/bin/env bash
###############################################################################
# Project Copy Script
#
# Copies a project while excluding generated and local-only directories.
#
# Excludes:
# - vendor/
# - node_modules/
# - .git/
# - storage/
# - bootstrap/cache/
# - provision/
#
# Usage:
# ./copy-project.sh /path/to/source /path/to/destination
#
###############################################################################
set -euo pipefail set -euo pipefail
if [ "$#" -ne 2 ]; then if [ "$#" -ne 2 ]; then
echo "Usage:" echo "Usage:"
echo " $0 <source> <destination>" echo " $0 <source> <backup-directory>"
exit 1 exit 1
fi fi
SOURCE="$(cd "$1" && pwd)" SOURCE="$(cd "$1" && pwd)"
DEST="$2" BACKUP_ROOT="$2"
NAME="$(basename "$SOURCE")"
STAMP="$(date +"%Y%m%d-%H%M%S")"
echo "Source : $SOURCE" WORK_DIR="$BACKUP_ROOT/${NAME}-${STAMP}"
echo "Destination : $DEST" ZIP_FILE="$BACKUP_ROOT/${NAME}-${STAMP}.zip"
echo
mkdir -p "$DEST" mkdir -p "$BACKUP_ROOT"
echo "Copying..."
echo "Copying clean source..."
rsync -a \ rsync -a \
--progress \
--delete \ --delete \
--exclude=".git/" \ --exclude=".git/" \
--exclude="vendor/" \ --exclude="vendor/" \
@@ -46,17 +27,22 @@ rsync -a \
--exclude="storage/" \ --exclude="storage/" \
--exclude="bootstrap/cache/" \ --exclude="bootstrap/cache/" \
--exclude="provision/" \ --exclude="provision/" \
--exclude="provisions/" \
"$SOURCE/" \ "$SOURCE/" \
"$DEST/" "$WORK_DIR/"
echo echo "Recreating required empty Laravel directories..."
echo "Creating required empty directories..." mkdir -p "$WORK_DIR/storage" "$WORK_DIR/bootstrap/cache"
touch "$WORK_DIR/storage/.gitkeep" "$WORK_DIR/bootstrap/cache/.gitkeep"
mkdir -p "$DEST/storage" echo "Creating zip..."
mkdir -p "$DEST/bootstrap/cache" (
cd "$BACKUP_ROOT"
zip -qr "$(basename "$ZIP_FILE")" "$(basename "$WORK_DIR")"
)
touch "$DEST/storage/.gitkeep" echo "Deleting temporary backup folder..."
touch "$DEST/bootstrap/cache/.gitkeep" rm -rf "$WORK_DIR"
echo echo "Done:"
echo "Done." echo "$ZIP_FILE"