-
Notifications
You must be signed in to change notification settings - Fork 74
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add wporg-mu-plugins/.../utilities
to docker environment
#987
Add wporg-mu-plugins/.../utilities
to docker environment
#987
Conversation
…ilities from there into correct path
Ahh, of course! 🤦♀️ It's because we have To avoid future problems, let's configure the path for |
31ffc79
to
c030f1d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This worked for me 👍🏻
I'm guessing there's probably a way to have it install to the desired path to begin with, rather than using post-update-cmd
, but it's probably not worth digging into since this works.
Tried to look for native ways to cherry-pick folders from the repo and set path for it. Looks like composer nor |
🤔 I was thinking it might work to set a custom "installer-paths": {
"public_html/wp-content/mu-plugins-private/wporg-mu-plugins/pub-sync": ["wporg/wporg-mu-plugins"],
} For that to work it may require overriding the "repositories": [
{
"type": "package",
"package": [
{
"name": "wporg/wporg-mu-plugins",
"type": "vcs",
"version": "dev-build", /* or maybe just `build` ? */
"source": {
"type": "vcs",
"url": "https://github.com/WordPress/wporg-mu-plugins.git"
"reference": "dev-build" /* same as above ? */
}
}
]
}
] I haven't tested any of that, though, and I wouldn't be surprised at all if it doesn't work. I've spent more hours banging my head against a wall w/ Composer than I care to admit 😆 I think it's totally fine to leave things the way they are. |
@iandunn
Seems like |
Utilities were moved from the repo into
wporg-mu-plugins
repository, which broke for example CSV exports and meetup.com API calls.This PR adds that repository and uses Composer
post-update-cmd
scripts to move the utilities fromwporg-mu-plugins
into the path where2-autoloader.php
expects it to be.We cannot use
[email protected]
format as the repository URL, since that fails on Docker. We would need to add github.com into~/.ssh/known_hosts
so it's just easier to use HTTPS instead of SSH. See docker-library/golang#148 for more details.I'm a bit puzzled about why the repository ends up in root
wp-content
(outsidepublic_html
) instead ofvendor
, but that seems to be the case, and we clean up a bit later so didn't bother to care too much 🤷♂️In
post-update-cmd
let's first create the needed parent directories. The-p
flag on themkdir
command does that. Then move onlyutilities
directory, since we don't need anything else from the repo. Lastly do some cleanup and remove thewp-content
directory where the repository was installed.Fixes #769
Props @iandunn
How to test the changes in this Pull Request:
cd ../
because shell opens inpublic_html
instead of our root directoryrm -r composer.lock
for good measurephp composer.phar install
ls public_html/wp-content/mu-plugins-private/wporg-mu-plugins/pub-sync