Automattic / themes

Free WordPress themes made by Automattic for WordPress.org and WordPress.com.
https://themeshaper.com
GNU General Public License v2.0
882 stars 351 forks source link

Automate Core Theme Update Process #6288

Closed pbking closed 2 years ago

pbking commented 2 years ago

We need an automated process to update wpcom themes with changes to core themes.

We currently have a different repository with versioning that differentiates our core themes so that we have the option to make changes faster than the core theme pipeline allows, or changes specific to the platform.

We need to bring in the changes to core themes regularly. While this likely can't be fully automated it can hopefully be a push-button process.

We're operating between the wpcom git repository and the wporg github (or possibly wporg svn) repositories.

pbking commented 2 years ago

I haven't figured out how to do this within the structure of the themes git repository. It may be possible but I haven't figured it out. In the meantime I've created this repository which is mostly just a utility script and a place for the checked out resources to live. It also makes a convenient place to use wp-env to test the themes locally. It doesn't have to live there, but was a quick place to put things for now.

I notice that MOST of the conflicts that need to be handled are due to the '-wpcom' versioning conflict. That was 90% of the conflicts I resolved.

I used the script and completed a number of manual steps and have created the following diffs:

~~D84876-code D84877-code D84878-code~~

These are not all of the necessary updates, only a few that I pushed to evaluate the process.

Still needed to automate are the creation of the phabricator diffs; one for each theme.

I'm not sure if the utility should be triggered once-per-theme and the process can be done top-to-bottom with one theme, or if they can be done in a batch and just create a buncha different diffs to review in the process. (I'm currently leaning towards the latter).

pbking commented 2 years ago

Ok... ignore the above. I was able to do what I was doing in the separate repository but instead do it in the bounds of the /pub themes project; I'll be closing that other repo down.

You can find the work to improve the core syncing scripts as well as all of the diff created using that process in this change.