I am trying to set up composer for a project I am working on. The project is basically a wordpress site that sits on some repo. What I am trying to accomplish below is as follows:
- download the private github repo into the root directory (currently working)
- move
.htaccess,.gitand.gitignorefrom the repo we downloadedrepodir/*to the project root one level up (not working) - download the packagist theme and plugin as specified below (working)
- move the private plugin from the
repodir/plugins/custompluginfolder to thewp-content/plugins/*in the root (not working) - (optional but useful) delete the repodir since everything we need is in the root
Currently everything is being downloaded but the files are scattered between the repo directory and the wp-content created by packagist and the post-install-cmd doesn't seem to work.
Has anyone faced this issue before? perhaps there's a cleaner way to handle this?
I appreciate any suggestions.
This is what I tried:
{
"repositories": [
{
"type": "package",
"package": {
"name": "somepackage",
"version": "1.0",
"source": {
"url": "https://github.com/somepackage/somepackage.com.git",
"type": "git",
"reference": "master"
}
}
},
{
"type": "composer",
"url": "https://wpackagist.org"
}
],
"require": {
"somepackage": "1.0",
"wpackagist-plugin/revslider": "*",
"wpackagist-theme/storefront": "2.2.5"
},
"config": {
"vendor-dir": "/"
},
"scripts": {
"post-install-cmd": [
"mv ./repodir/.git ./*",
"mv ./repodir/.gitignore ./*",
"mv ./repodir/.htaccess ./*",
"mv ./repodir/wp-content/plugins/plugindir ./wp-content/plugins/*"
]
}
}