i am trying to build a capistrano deplyoment script for a git project which has a submodule.
I am running these commands
run "git clone git@github.com:GITPROJECT /var/www/myfolder"
when i run this the submodule wont clone to /var/www/myfolder instead it only creates an empty folder with the name of the submodule
when I try to run this it wont work either
run "cd /var/www/myfolder/submodule && git pull master"
can someone help me with this please ?
Basically what you need is
option in your
deploy.rbscript. It tells capistrano to init and update git submodules after fetching source from the main repo. If for some reason you want to do it manually you can run that from the root directory of your project:though, if I remember correctly,
--initis not available in some older versions of git so if it doesn’t work you can do it like that:Have a look at this answer for more extensive explanation about git options for capistrano.