Capistrano::GitCopy
Creates a tar archive locally from the git repository and uploads it to the remote server.
Setup
Add the library to your Gemfile:
group :development do
gem 'capistrano-git-copy', require: false
end
And require it in your Capfile:
require 'capistrano/git_copy'
Now use git_copy as your SCM type in your config/deploy.rb:
set :scm, :git_copy
By default, it includes all submodules into the deployment package. However, if they are not needed in a particular deployment, you can disable them with a configuration option:
set :with_submodules, false
Besides using export-ignore in .gitattributes it's possible exclude files and directories by
adding them to git_excludes:
set :git_excludes, %w(config/database.yml.example test rspec)
Notes
- Uses git-archive-all for bundling repositories.
Contributing
- Fork it
- Create your feature branch (
git checkout -b my-new-feature) - Commit your changes (
git commit -am 'Add some feature') - Push to the branch (
git push origin my-new-feature) - Create new Pull Request