Update deploy script to remove separate branch fix plugin

This commit is contained in:
2025-04-13 04:11:59 +01:00
parent 7a2f123278
commit 7dc16b1850

View File

@ -1,25 +1,28 @@
#!/bin/bash #!/bin/bash
# Deploy script for local testing # 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 # Set variables
SOURCE_DIR="$(pwd)" SOURCE_DIR="$(pwd)"
TARGET_DIR="$HOME/Local/plugin-testing/app/public/wp-content/plugins" TARGET_DIR="$HOME/Local/plugin-testing/app/public/wp-content/plugins"
MAIN_PLUGIN_NAME="fix-plugin-file-does-not-exist-notices" 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/$MAIN_PLUGIN_NAME"
mkdir -p "$TARGET_DIR/$BRANCH_FIX_PLUGIN_NAME"
# Clean up target directories first # Clean up target directory first
echo "Cleaning up target directories..." echo "Cleaning up target directory..."
rm -rf "$TARGET_DIR/$MAIN_PLUGIN_NAME"/* 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 # 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/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/" 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/" cp -R "$SOURCE_DIR/vendor"/* "$TARGET_DIR/$MAIN_PLUGIN_NAME/vendor/"
fi 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 "Deployment complete!"
echo "Main plugin deployed to: $TARGET_DIR/$MAIN_PLUGIN_NAME" echo "Plugin deployed to: $TARGET_DIR/$MAIN_PLUGIN_NAME"
echo "Branch fix plugin deployed to: $TARGET_DIR/$BRANCH_FIX_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 "1. Fix 'Plugin file does not exist' Notices"
echo "2. GU Branch Fix" echo "2. Git Updater"
echo "3. Git Updater"