No release in over a year
Capistrano SCM plugin for local git clone and upload.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

 Project Readme

Capistrano::Scm::LocalGitUpload

Gem Version Ruby

Capistrano SCM Plugin for local git clone and upload.

This plugin firstly clones the git repository to the local host and thereafter uploads files on the local host to the remote servers.

Installation

Add this line to your application's Gemfile:

gem 'capistrano-scm-local_git_upload'

And execute:

$ bundle install

Add to Capfile:

require "capistrano/scm/local_git_upload"
install_plugin Capistrano::SCM::LocalGitUpload

Usage

The git repository is cloned to work_path (default: work) on the local host before deploy:started.

Then, files under upload_path (default: upload) on the local host are uploaded to release_path on the remote servers after deploy:new_release_path.

Therefore, you need to prepare upload_path using work_path files until deploy:new_release_path.

This is a simple copy example from work/public to upload/public.

namespace :sample_app do
  task :copy_to_upload do
    run_locally do
      execute :cp, '-pr', work_path.join('public'), upload_path
    end
  end
  before 'deploy:new_release_path', 'sample_app:copy_to_upload'
end

License

The gem is available as open source under the terms of the MIT License.