Skip to content

Fix including the minified assets in the WP.org deploy#1655

Merged
akirk merged 8 commits into
developfrom
wporg-build-dir
Jul 13, 2023
Merged

Fix including the minified assets in the WP.org deploy#1655
akirk merged 8 commits into
developfrom
wporg-build-dir

Conversation

@akirk

@akirk akirk commented Jul 13, 2023

Copy link
Copy Markdown
Member

Problem

The approach in #1654 doesn't include the built minified assets even though the example readme in https://github.com/10up/action-wordpress-plugin-deploy suggests otherwise.

It turns out that the action uses git archive if you don't have a .distignore. If we build the files into the git monitored directory, then those newly built files are ignored by git archive since it creates the archive from its index files.

Relates to #1587.

Solution

git commit the newly built files.

Tasks

@akirk akirk requested a review from pedro-mendonca July 13, 2023 09:12
@pedro-mendonca

Copy link
Copy Markdown
Member

I would like to understand why it's not working as expected according the https://github.com/10up/action-wordpress-plugin-deploy docs.
Still, the build directory works the same, so I think it's also fine.

@akirk

akirk commented Jul 13, 2023

Copy link
Copy Markdown
Member Author

Yes, the build works but then the built files are not included in SVN:

Sending        trunk/CHANGELOG.md
Sending        trunk/assets/css/style.css
Sending        trunk/assets/js/common.js
Sending        trunk/assets/js/editor.js
Sending        trunk/assets/js/glossary.js
Sending        trunk/assets/js/mass-create-sets-page.js
Sending        trunk/***.php

@akirk akirk changed the title Use a build directory to include the minified assets in the WP.org deploy Fix including the minified assets in the WP.org deploy Jul 13, 2023
@pedro-mendonca

Copy link
Copy Markdown
Member

Will adding the .distignore file solve it?

@akirk

akirk commented Jul 13, 2023

Copy link
Copy Markdown
Member Author

It would but why not just re-use the .gitattributes file, fix the bug upstream and use our bugfix in the interim?

@pedro-mendonca

Copy link
Copy Markdown
Member

Great that you've identified the bug upstream! :)
Whatever temporary bugfix on GlotPress side is fine, to be removed after the upstream bug is fixed.

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.

3 participants