This proposal should fix #1 and #2.
Here's the current logic:
// 1. Clone WP
// 2. Delete wp-content etc
// 3. Make sure wp-content is up to date
// 4. Copy our wp-content, omitting gitfoo
// 5. ?? Theme/plugin build steps ?? (Makefile-esque thing?)
// 6. Symlink required files from shared dir
We should change that to be:
This will mean that we're starting out with a totally clean workdir, so plugins should not persist and there should be no issue moving between plugins and submodules.
@harry-m Does this sound reasonable?
Why not do steps 5, 6, & 7 in the workdir, and then copy and remove gitfoo?
@harry-m Because then somebody will have to SSH into the machine and rm -rf the original workdir and run chef-client every time we want to delete a submodule or plugin.
Must be missing something. If we have a repo that is always checked out, from which deploys are generated, why wouldn't we make sure that repo is definitely in the correct state and then generate the deployable site from that? Why is it necessary to do the updates in a copy? Can't we just git clean -dxff in the always-checked-out repo?
@harry-m I obviously wasn't thinking when I said that. Yeah, the clean -dxff command will mean we can do those commands in the main directory.
So with that in mind, maybe all we need to change is to add a single line which runs "git clean -dxff" before pull/submodule update/etc.
Swish. Let's do it.
There's an open pull request on #34. Does it resolve all the problems noted in this issue?
That's the intention, yes. Needs some more work though.
Ok, cool. I'll close this one then.