Skip to content

Always download the appropriate artifact#11221

Open
desrosj wants to merge 1 commit intoWordPress:trunkfrom
desrosj:fix/gutenberg-download-command
Open

Always download the appropriate artifact#11221
desrosj wants to merge 1 commit intoWordPress:trunkfrom
desrosj:fix/gutenberg-download-command

Conversation

@desrosj
Copy link
Member

@desrosj desrosj commented Mar 11, 2026

This PR aims to prevent a failure when npm install is run when either the directory already exists or the the gutenberg/.gutenberg-hash file is missing (which means the script cannot currently confirm the correct version of the Gutenberg plugin is present).

  • The postinstall command is changed from gutenberg:download to gutenberg:verify.
  • The --force option has been removed. gutenberg:download will now download a fresh copy every time it's run.
  • The gutenberg:verify script is now the preferred entry point for managing the files within the gutenberg directory. It will only trigger a downoad if the hashes do not match, or the folder is missing entirely.

Trac ticket: Core-64393.

Use of AI Tools

Claude was used to create the initial draft for this PR.


This Pull Request is for code review only. Please keep all other discussion in the Trac ticket. Do not merge this Pull Request. See GitHub Pull Requests for Code Review in the Core Handbook for more details.

@desrosj desrosj self-assigned this Mar 11, 2026
@github-actions
Copy link

Test using WordPress Playground

The changes in this pull request can previewed and tested using a WordPress Playground instance.

WordPress Playground is an experimental project that creates a full WordPress instance entirely within the browser.

Some things to be aware of

  • All changes will be lost when closing a tab with a Playground instance.
  • All changes will be lost when refreshing the page.
  • A fresh instance is created each time the link below is clicked.
  • Every time this pull request is updated, a new ZIP file containing all changes is created. If changes are not reflected in the Playground instance,
    it's possible that the most recent build failed, or has not completed. Check the list of workflow runs to be sure.

For more details about these limitations and more, check out the Limitations page in the WordPress Playground documentation.

Test this pull request with WordPress Playground.

@desrosj desrosj force-pushed the fix/gutenberg-download-command branch from eeb4da0 to 85076b2 Compare March 12, 2026 04:59
@desrosj desrosj marked this pull request as ready for review March 12, 2026 05:00
@github-actions
Copy link

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

Core Committers: Use this line as a base for the props when committing in SVN:

Props desrosj.

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@desrosj desrosj requested a review from ockham March 12, 2026 11:26
@ockham ockham force-pushed the fix/gutenberg-download-command branch from 85076b2 to 3abcfa8 Compare March 12, 2026 13:09
Copy link
Contributor

@ockham ockham left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, and behaves as advertised in my local testing!

Disclaimer: I'm not super-familiar with the "new" build system and GB code sync, but AFAICS, the changes make sense to me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants