woocommerce / storefront

Official theme for WooCommerce
https://wordpress.org/themes/storefront/
972 stars 471 forks source link

Ensure that the build has min.js files before generating the .zip file #2149

Closed gigitux closed 4 months ago

gigitux commented 4 months ago

This PR adds a sanity check step before generating the .zip file to proceed with the release.

When the right version of node isn't used, the *.min.js files aren't generated and this may create some issues on website. This PR ensures that the min.js files exist before creating the zip.

Testing instructions:

  1. Checkout this branch
  2. Switch to the node 14 version.
  3. Run npm run build.
  4. Ensure that everything works correctly.
  5. Switch to the node 20 version (or another version different from 14).
  6. Run npm run build.
  7. Expect to see an error.
gigitux commented 4 months ago

Works like a charm! I could reproduce the issue on my end when running the build script with the wrong node version. I left one minor comment, but pre-approving.

Thanks for the review! I added the troubleshooting message! Great suggestion!