update-frontend.sh 1004 B

12345678910111213141516171819202122232425262728293031
  1. #!/bin/bash
  2. # Script to update desktop app with latest frontend changes
  3. # Usage: ./update-frontend.sh
  4. echo "🔄 Updating desktop app with latest frontend changes..."
  5. # Check if we're in the right directory
  6. if [ ! -f "package.json" ] || [ ! -f "../src/main/resources/static/index.html" ]; then
  7. echo "❌ Error: Please run this script from the desktop-app directory"
  8. exit 1
  9. fi
  10. # Copy frontend files
  11. echo "📁 Copying frontend files..."
  12. cp -r ../src/main/resources/static/* . 2>/dev/null || {
  13. echo "❌ Error: Could not copy frontend files"
  14. exit 1
  15. }
  16. # Check if files were copied successfully
  17. if [ -f "index.html" ] && [ -f "home.html" ] && [ -d "js" ] && [ -d "css" ]; then
  18. echo "✅ Frontend files updated successfully"
  19. echo "🏗️ You can now run 'npm run build-linux' to create a new build"
  20. echo "🚀 Or run 'npm start' to test the changes"
  21. else
  22. echo "❌ Error: Some frontend files may not have been copied correctly"
  23. exit 1
  24. fi
  25. echo "✨ Update complete!"