Class: Capistrano::BundleRsync::LocalGit
- Inherits:
-
SCM
- Object
- SimpleDelegator
- Base
- SCM
- Capistrano::BundleRsync::LocalGit
show all
- Defined in:
- lib/capistrano/bundle_rsync/local_git.rb
Instance Method Summary
collapse
Methods inherited from SCM
#rsync_shared, #test
Methods inherited from Base
#config, #initialize
Instance Method Details
#check ⇒ Object
5
6
7
8
9
|
# File 'lib/capistrano/bundle_rsync/local_git.rb', line 5
def check
raise ArgumentError.new('`repo_url` must be local path to use `local_git` scm') unless local_path?(repo_url)
exit 1 unless execute("git ls-remote #{repo_url} HEAD")
execute("mkdir -p #{config.local_base_path}")
end
|
#clean_release ⇒ Object
20
21
|
# File 'lib/capistrano/bundle_rsync/local_git.rb', line 20
def clean_release
end
|
#clone ⇒ Object
11
12
|
# File 'lib/capistrano/bundle_rsync/local_git.rb', line 11
def clone
end
|
#create_release ⇒ Object
17
18
|
# File 'lib/capistrano/bundle_rsync/local_git.rb', line 17
def create_release
end
|
#rsync_release ⇒ Object
23
24
25
26
27
28
29
30
31
32
33
34
|
# File 'lib/capistrano/bundle_rsync/local_git.rb', line 23
def rsync_release
hosts = ::Capistrano::Configuration.env.filter(release_roles(:all))
rsync_options = config.rsync_options
Parallel.each(hosts, in_threads: config.max_parallels(hosts)) do |host|
ssh = config.build_ssh_command(host)
if tree = fetch(:repo_tree)
execute :rsync, "#{rsync_options} --rsh='#{ssh}' #{repo_url}/#{tree}/ #{host}:#{release_path}/"
else
execute :rsync, "#{rsync_options} --rsh='#{ssh}' #{repo_url}/ #{host}:#{release_path}/"
end
end
end
|
#set_current_revision ⇒ Object
36
37
38
39
40
|
# File 'lib/capistrano/bundle_rsync/local_git.rb', line 36
def set_current_revision
within repo_url do
set :current_revision, capture(:git, "rev-parse --short HEAD")
end
end
|
#update ⇒ Object
14
15
|
# File 'lib/capistrano/bundle_rsync/local_git.rb', line 14
def update
end
|