diff --git a/commands/command.deploy.php b/commands/command.deploy.php index 7321463..9b05924 100644 --- a/commands/command.deploy.php +++ b/commands/command.deploy.php @@ -82,6 +82,10 @@ private function shouldSetPermissionsAfter() { return $this->config['servers'][$this->env]['deploy']['set_permissions_after']; } + private function shouldUpdateSubmodules() { + return $this->config['servers'][$this->env]['deploy']['update_submodules']; + } + private function handleNoEnvironment() { if ($this->env == null) { $output = <<getSshConnection(); if ($this->deployed) { $output = $ssh->exec('git pull'); + + if ($this->shouldUpdateSubmodules()) { + $output .= $ssh->exec('git submodule init; git submodule update'); + } } else { $path_pieces = explode('/', $this->webroot); $dir_name = array_pop($path_pieces); diff --git a/default.yaml b/default.yaml index 8d64f45..4c3f481 100755 --- a/default.yaml +++ b/default.yaml @@ -50,6 +50,7 @@ servers: # pull_content_before: true # clear_cache_after: true # set_permissions_after: false +# update_submodules: false # # == RSYNC == # deploy: