Skip to content

Instantly share code, notes, and snippets.

@PavloBezpalov
Created October 7, 2016 12:23
Show Gist options
  • Save PavloBezpalov/c5e550709d801408ce1c302f4f374e0a to your computer and use it in GitHub Desktop.
Save PavloBezpalov/c5e550709d801408ce1c302f4f374e0a to your computer and use it in GitHub Desktop.
Updating capistrano repository url
namespace :git do
task :update_repo_url do
on roles(:all) do
within repo_path do
execute :git, 'remote', 'set-url', 'origin', fetch(:repo_url)
end
end
end
end
before 'deploy:check', 'git:update_repo_url'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment