Automattic / wc-calypso-bridge

20 stars 4 forks source link

Build the app before running the prep-release script #1477

Open yuliyan opened 3 months ago

yuliyan commented 3 months ago

Changes proposed in this Pull Request:

The update-translations command of the prep-release script will scan the directory for translatable strings, including the build directory, which can either be outdated or not existing at all, resulting in excluding strings from the generated POT file.

This PR updates the npm run prepare-release script to add npm run build prior to executing the prep-release.js script to ensure the build directory is up to date when scanning for translatable strings.

How to test the changes in this Pull Request:

  1. Code review.

Other information:

FOR PR REVIEWER ONLY:

github-actions[bot] commented 3 months ago

Size Change: 0 B

Total Size: 197 kB

ℹ️ View Unchanged | Filename | Size | | :--- | :---: | | `./build/53.js` | 1.05 kB | | `./build/index.css` | 883 B | | `./build/index.js` | 122 kB | | `./build/marketing.js` | 58 kB | | `./build/payment-gateway-suggestions.css` | 1.25 kB | | `./build/payment-gateway-suggestions.js` | 6.46 kB | | `./build/plugins.js` | 3.92 kB | | `./build/style-index.css` | 2.15 kB | | `./build/style-marketing.css` | 805 B |

compressed-size-action

yuliyan commented 3 months ago

Does this mean that we have to remove the node modules directory, so that it isn't packaged up in the release afterwards?

The node_modules directory is removed when building the app in the create-release script.

d-alleyne commented 3 months ago

Does this mean that we have to remove the node modules directory, so that it isn't packaged up in the release afterwards?

The node_modules directory is removed when building the app in the create-release script.

I simulated a pre-release by bumping the version and updating the changelog, but exited the process before creating the pull request.

diff --git a/.sshyncignore b/.sshyncignore  
new file mode 100644  
index 0000000..353e57b  
--- /dev/null  
+++ b/.sshyncignore  
@@ -0,0 +1,7 @@  
+.git  
+node_modules/  
+tests/  
+vendor/  
+.cache/  
+.idea  
+.config  

It seems that the Git commands in these scripts are adding files that were not initially tracked, ~or were even marked to be ignored in the .gitignore file.~

Other than that, LGTM!

yuliyan commented 3 months ago

@markbiek, since you've worked on the script before, could you confirm if it's ok to build the app before running the prep-release.js script?