Commit fcfe22a
committed
Build/Test Tools: Remove
In [61458], a `postinstall` script was introduced that ensured the source code from the `gutenberg` repository was present before attempting to run the build script.
The WordPress.org Hosting Tests surfaced an edge case where the `postinstall` script was failing when `nodevenv` is used. Because it serves as a wrapper for Node.js, `NPM_CONFIG_PREFIX` is set to the virual envirnoment directory and not the actual project source directory.
This removes `gutenberg:verify` from `postinstall` entirely. `gutenberg:verify` is responsible for confirming that the `gutenberg` directory exists, that the commit SHA value in `gutenberg/.gutenberg-hash` matches `gutenberg.sha` in the `package.json` file, and it downloads a fresh copy if not.
While this will result in the necessary files not being present locally after running `npm install`, `gutenberg:verify` is specified as the first task executed when the `build` and `build:dev` scripts are run. Running either build script has been a requirement to run WordPress locally for some time now, so this does not introduce a new required step. It simply delays when the built asset will be retrieved from the GitHub Container Registry when necessary.
`postinstall` scripts should also be avoided entirely due to their significantly insecure nature (see #64543).
Follow up to [61492], [61873], and [62021].
Props jorbin, johnbillion.
Fixes #64874. See #64393, #64543.
git-svn-id: https://develop.svn.wordpress.org/trunk@62321 602fd350-edb4-49c9-b593-d223f7449a82gutenberg:verify script on postinstall.1 parent 5aca29c commit fcfe22a
2 files changed
Lines changed: 0 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
113 | 113 | | |
114 | 114 | | |
115 | 115 | | |
116 | | - | |
117 | 116 | | |
118 | 117 | | |
119 | 118 | | |
| |||
0 commit comments