What is the easiest way to update the WordPress Git submodule on server after deploy?
henscu opened this issue · 3 comments
Question
What is the easiest way to update the WordPress Git submodule directory on a server after deploy?
Background
I have forked this repo and used it to develop a WordPress Multisite instance.
I just set up Capistrano V3+ to deploy my WordPress Skeleton based site to my server, as recommended by Mark Jaquith.
The problem is that my WordPress submodule is not included as part of the standard Capistrano V3+ deploy. There are many different StackOverflow answers as to how to fix this in Capistrano, all of them fairly hacky...
However, it strikes me that it would be just as easy to manually update the WordPress submodule on my server, until Capistrano V3+ is updated to enable deployment of Git submodules...
Or is there an easier, more straightforward way to update the WordPress submodule on a server after deploy?
Typical... just after asking the question I find a possible solution here:
https://gist.github.com/seenmyfate/11206162
Though would still be good to know the best commands to update the WordPress Git submodule manually...
cd wp
git fetch && git fetch --tags
git checkout 4.9.1
cd ..
git add wp
git commit -m "WordPress 4.9.1"
I don't think git add --all
includes the submodule update that's why I add wp
specifically here
Thanks @matthieuhays