I’m using Capistrano (as part of Bedrock) to deploy WordPress.
I’m also using Composer to manage php dependencies and my WordPress plugins, and I have my theme managed by git as a submodule.
I’ve got everything setup and I’ve successfully deployed WordPress to my remote server.
The problem is I’m managing my custom theme with git submodules. I can’t find a way to init and update the submodule during the default deployment, or as a separate task. I’d prefer to have it as a separate task as I don’t change the underlining project files too frequently.
-
I found this gist that creates a task to do the same but its using an older version of Capistrano.
-
I tried this method but it fails when trying to create the release symlinks.
-
I tried enabling submodules with
set :git_enable_submodules, 1
in mydeploy.rb
file but that seems to be missing from Capistrano V3.x. -
I found this thread where the author of Capistrano explains why submodule support was removed and another commenter posted this gist, which is giving me this error
Tasks: TOP => git:create_release => git:update => git:clone
.
What are other people doing to enable simple deployments with Capistrano that include git submodules?
i also use git submodule in capistrano 2 i used:
set :git_enable_submodules, 1
worked prefctly.
when i moved into Capistrano 3.x i started to use:
also working like a charm.
see more details here:
https://github.com/capistrano/capistrano/blob/master/lib/capistrano/tasks/git.rake#L34
https://github.com/capistrano/capistrano/blob/master/lib/capistrano/tasks/git.rake#L56