mirror of
https://github.com/capistrano/capistrano
synced 2023-03-27 23:21:18 -04:00
Add export deployment option for git and add instructions to deploy from a local repository.
This commit is contained in:
parent
d11006102c
commit
dfe19aa70c
1 changed files with 18 additions and 1 deletions
|
@ -92,13 +92,24 @@ module Capistrano
|
|||
#
|
||||
# set :git_shallow_clone, 1
|
||||
#
|
||||
# For those that don't like to leave your entire repository on
|
||||
# your production server you can:
|
||||
#
|
||||
# set :deploy_via, :export
|
||||
#
|
||||
# To deploy from a local repository:
|
||||
#
|
||||
# set :repository, "file://."
|
||||
# set :deploy_via, :copy
|
||||
#
|
||||
# AUTHORS
|
||||
# -------
|
||||
#
|
||||
# Garry Dolley http://scie.nti.st
|
||||
# Contributions by Geoffrey Grosenbach http://topfunky.com
|
||||
# Scott Chacon http://jointheconversation.org
|
||||
# and Alex Arnell http://twologic.com
|
||||
# Alex Arnell http://twologic.com
|
||||
# and Phillip Goldenburg
|
||||
|
||||
class Git < Base
|
||||
# Sets the default command name for this SCM on your *local* machine.
|
||||
|
@ -146,6 +157,12 @@ module Capistrano
|
|||
execute.join(" && ")
|
||||
end
|
||||
|
||||
# An expensive export. Performs a checkout as above, then
|
||||
# removes the repo.
|
||||
def export(revision, destination)
|
||||
checkout(revision, destination) << " && rm -Rf #{destination}/.git"
|
||||
end
|
||||
|
||||
# Merges the changes to 'head' since the last fetch, for remote_cache
|
||||
# deployment strategy
|
||||
def sync(revision, destination)
|
||||
|
|
Loading…
Reference in a new issue