From 7dc16b1850e0b46e925b97c6fb24d1b6e6e90739 Mon Sep 17 00:00:00 2001 From: marcusquinn <6428977+marcusquinn@users.noreply.github.com> Date: Sun, 13 Apr 2025 04:11:59 +0100 Subject: [PATCH] Update deploy script to remove separate branch fix plugin --- deploy-local.sh | 31 ++++++++++++++----------------- 1 file changed, 14 insertions(+), 17 deletions(-) diff --git a/deploy-local.sh b/deploy-local.sh index e2f9849..85fbd51 100755 --- a/deploy-local.sh +++ b/deploy-local.sh @@ -1,25 +1,28 @@ #!/bin/bash # Deploy script for local testing -# This script copies the plugins to the local WordPress plugins directory +# This script copies the plugin to the local WordPress plugins directory # Set variables SOURCE_DIR="$(pwd)" TARGET_DIR="$HOME/Local/plugin-testing/app/public/wp-content/plugins" MAIN_PLUGIN_NAME="fix-plugin-file-does-not-exist-notices" -BRANCH_FIX_PLUGIN_NAME="gu-branch-fix" -# Create target directories if they don't exist +# Create target directory if it doesn't exist mkdir -p "$TARGET_DIR/$MAIN_PLUGIN_NAME" -mkdir -p "$TARGET_DIR/$BRANCH_FIX_PLUGIN_NAME" -# Clean up target directories first -echo "Cleaning up target directories..." +# Clean up target directory first +echo "Cleaning up target directory..." rm -rf "$TARGET_DIR/$MAIN_PLUGIN_NAME"/* -rm -rf "$TARGET_DIR/$BRANCH_FIX_PLUGIN_NAME"/* + +# Remove the separate branch fix plugin if it exists +if [ -d "$TARGET_DIR/gu-branch-fix" ]; then + echo "Removing separate branch fix plugin..." + rm -rf "$TARGET_DIR/gu-branch-fix" +fi # Copy main plugin files -echo "Copying main plugin files..." +echo "Copying plugin files..." cp "$SOURCE_DIR/wp-fix-plugin-does-not-exist-notices.php" "$TARGET_DIR/$MAIN_PLUGIN_NAME/fix-plugin-file-does-not-exist-notices.php" cp "$SOURCE_DIR/readme.txt" "$TARGET_DIR/$MAIN_PLUGIN_NAME/" @@ -49,15 +52,9 @@ if [ -d "$SOURCE_DIR/vendor" ]; then cp -R "$SOURCE_DIR/vendor"/* "$TARGET_DIR/$MAIN_PLUGIN_NAME/vendor/" fi -# Copy branch fix plugin files -echo "Copying branch fix plugin files..." -cp "$SOURCE_DIR/gu-branch-fix.php" "$TARGET_DIR/$BRANCH_FIX_PLUGIN_NAME/" - echo "Deployment complete!" -echo "Main plugin deployed to: $TARGET_DIR/$MAIN_PLUGIN_NAME" -echo "Branch fix plugin deployed to: $TARGET_DIR/$BRANCH_FIX_PLUGIN_NAME" +echo "Plugin deployed to: $TARGET_DIR/$MAIN_PLUGIN_NAME" -echo "\nRemember to activate both plugins in WordPress:" +echo "\nRemember to activate these plugins in WordPress:" echo "1. Fix 'Plugin file does not exist' Notices" -echo "2. GU Branch Fix" -echo "3. Git Updater" +echo "2. Git Updater"