PluginProbe
WPBot – AI ChatBot for Live Support, Lead Generation, WordPress Automation, AI Services / 8.8.1
WPBot – AI ChatBot for Live Support, Lead Generation, WordPress Automation, AI Services v8.8.1
8.8.1 8.8.0 8.7.9 8.7.8 8.7.7 8.7.6 8.7.5 8.7.4 8.7.3 8.7.2 8.7.1 8.7.0 8.6.9 8.6.8 8.6.7 8.6.6 8.6.5 8.6.4 8.6.2 8.6.1 8.6.0 8.5.9 8.5.8 8.5.7 8.5.6 All 537 releases
chatbot / addons / automator / build-plugin.sh

build-plugin.sh in WPBot – AI ChatBot for Live Support, Lead Generation, WordPress Automation, AI Services 8.8.1, at addons/automator/build-plugin.sh

52 lines 1.2 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 #!/bin/bash
2
3 # Exit on any error
4 set -e
5
6 # Configuration
7 PLUGIN_NAME="wpbot-automator"
8 BUILD_DIR="dist"
9 ZIP_FILE="${PLUGIN_NAME}.zip"
10
11 echo "🚀 Starting build process for ${PLUGIN_NAME}..."
12
13 # 1. Clean up previous builds
14 echo "🧹 Cleaning up old build files..."
15 rm -rf $BUILD_DIR
16 rm -f $ZIP_FILE
17
18 # 2. Build assets
19 echo "📦 Building assets..."
20 npm run build
21
22 # 3. Create temporary structure
23 echo "📁 Creating production structure..."
24 mkdir -p $BUILD_DIR/$PLUGIN_NAME$PLUGIN_NAME
25
26 # 4. Copy necessary files
27 echo "📂 Copying files..."
28 cp -r includes $BUILD_DIR/$PLUGIN_NAME$PLUGIN_NAME/
29 cp -r build $BUILD_DIR/$PLUGIN_NAME$PLUGIN_NAME/
30 cp -r assets $BUILD_DIR/$PLUGIN_NAME$PLUGIN_NAME/
31 cp wpbot-automator.php $BUILD_DIR/$PLUGIN_NAME$PLUGIN_NAME/
32 cp readme.txt $BUILD_DIR/$PLUGIN_NAME$PLUGIN_NAME/
33
34 # 5. Create Zip
35 echo "🤐 Generating zip file..."
36 cd $BUILD_DIR
37 zip -r ../$ZIP_FILE$ZIP_FILE . -x "**/.DS_Store" "**/node_modules/*" "**/.git/*"
38 cd ..
39
40 # 6. Final Cleanup
41 echo "🧹 Cleaning up temporary files..."
42 rm -rf $BUILD_DIR
43
44 if [ -f "$ZIP_FILE" ]; then
45 echo "�
46 Success! Zip file created at: $(pwd)/$ZIP_FILE$ZIP_FILE"
47 ls -lh "$ZIP_FILE"
48 else
49 echo "❌ Error: Zip file was not created."
50 exit 1
51 fi
52