Update deploy script to remove separate branch fix plugin
This commit is contained in:
@ -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"
|
||||
|
Reference in New Issue
Block a user