Skip to content

Capsitrano 3 copy scm - tar your git branch and deploy to your server

License

Notifications You must be signed in to change notification settings

jbaptperez/capsitrano-scm-gitcopy

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

74 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Capistrano 3 :copy

A copy strategy for Capistrano 3, which mimics the :copy scm of Capistrano 2. This Gem is inspired by and based on https://github.com/wercker/capistrano-scm-copy. Thank wercker so much.

This will make Capistrano tar the a specific git branch, upload it to the server(s) and then extract it in the release directory.

There is sub_directory option. When specified, onthe the subtree of the checked-out repository will be deployed. This is useful when the rails application is not at the root of the repository.

Requirements

Machine running Capistrano:

  • Capistrano 3
  • tar

Servers:

  • mktemp
  • tar
  • ruby

Installation

First make sure you install the capistrano-scm-gitcopy by adding it to your Gemfile:

gem "capistrano-scm-gitcopy"

Then switch the :scm option to :gitcopy in config/deploy.rb:

set :scm, :gitcopy

Finally, DO NOT ADD require 'capistrano/gitcopy' to Capfile because capistrano/setup already loads the scm module with the :scm value you specified.

Usage

  cap uat deploy -s branch=(your release branch)

About

Capsitrano 3 copy scm - tar your git branch and deploy to your server

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Ruby 100.0%