diff --git a/config/deploy.rb b/config/deploy.rb index b90c14a..b89577f 100644 --- a/config/deploy.rb +++ b/config/deploy.rb @@ -5,7 +5,7 @@ set :application, "mint-lgbt" set :repo_url, "https://fem.mint.lgbt/mint.lgbt/home.git" # Default branch is :master -ask :branch, `git rev-parse --abbrev-ref HEAD`.chomp +# ask :branch, `git rev-parse --abbrev-ref HEAD`.chomp # Default deploy_to directory is /var/www/my_app_name set :deploy_to, "/opt/www/mint-lgbt" diff --git a/lib/capistrano/tasks/.keep b/lib/capistrano/tasks/.keep deleted file mode 100644 index e69de29..0000000 diff --git a/lib/capistrano/tasks/git.rake b/lib/capistrano/tasks/git.rake new file mode 100644 index 0000000..c2db919 --- /dev/null +++ b/lib/capistrano/tasks/git.rake @@ -0,0 +1,12 @@ +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 \ No newline at end of file