Skip to content

Instantly share code, notes, and snippets.

@fgarcia
Forked from corny/git.cap
Created March 10, 2014 16:04
Show Gist options
  • Save fgarcia/9467925 to your computer and use it in GitHub Desktop.
Save fgarcia/9467925 to your computer and use it in GitHub Desktop.
# Save this file as lib/capistrano/tasks/git.cap
namespace :git do
desc 'Copy repo to releases'
task create_release: :'git:update' do
on roles(:all) do
with fetch(:git_environmental_variables) do
within repo_path do
execute :git, :clone, '-b', fetch(:branch), '--recursive', '.', release_path
end
end
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment