scaffold-command icon indicating copy to clipboard operation
scaffold-command copied to clipboard

Improve Bash script readability and add color-coded output

Open mostafasoufi opened this issue 1 year ago • 2 comments

This PR improves the existing Bash script by making it more human-readable and providing better user interaction through the following changes:

  • Color-Coded Output: Utilizes tput to introduce colored feedback for errors, progress updates, and successful operations.

    • Red for errors
    • Green for successful operations
    • Yellow for warnings or skipped steps
    • Cyan for informational progress messages
    • Improved Readability: Added descriptive echo statements at key steps (e.g., downloading files, creating databases, etc.) to
    • make the script's execution flow clear and easy to follow.
  • Progress Feedback: Each major step (WordPress installation, test suite setup, and database management) now provides clear and distinct feedback to the user.

  • Confirmation for Database Recreation: The script prompts the user to confirm before deleting and recreating an existing test database, ensuring safer operation.

This enhancement will significantly improve the user experience when running the script by making the outputs more readable and informative.

Screenshot 2024-09-18 at 10 01 36 AM Screenshot 2024-09-18 at 9 56 19 AM

mostafasoufi avatar Sep 18 '24 07:09 mostafasoufi

Thanks for the work on this, @mostafasoufi !

I'm not merging this right now, as we're currently in discussions about the future of this script in general, and whether we might want to switch the entire testing flow over to something like wp-env.

I'll keep you updated in here.

schlessera avatar Feb 05 '25 14:02 schlessera

Sounds good! Happy to help if needed. @schlessera

mostafasoufi avatar Feb 06 '25 06:02 mostafasoufi

I incorporated these changes in #356

Still not decided how we proceed with this script though.

swissspidy avatar Nov 02 '25 14:11 swissspidy