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
4
5
6
7
8
|
# File 'lib/capistrano/bundle_rsync/local_git.rb', line 4
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}")
execute("mkdir -p #{config.local_base_path}")
end
|
#clone ⇒ Object
10
11
|
# File 'lib/capistrano/bundle_rsync/local_git.rb', line 10
def clone
end
|
#create_release ⇒ Object
16
17
|
# File 'lib/capistrano/bundle_rsync/local_git.rb', line 16
def create_release
end
|
#rsync_release ⇒ Object
19
20
21
22
23
24
25
26
|
# File 'lib/capistrano/bundle_rsync/local_git.rb', line 19
def rsync_release
hosts = 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)
execute :rsync, "#{rsync_options} --rsh='#{ssh}' #{repo_url}/ #{host}:#{release_path}/"
end
end
|
#set_current_revision ⇒ Object
28
29
30
31
32
|
# File 'lib/capistrano/bundle_rsync/local_git.rb', line 28
def set_current_revision
within repo_url do
set :current_revision, capture(:git, "rev-parse --short HEAD")
end
end
|
#update ⇒ Object
13
14
|
# File 'lib/capistrano/bundle_rsync/local_git.rb', line 13
def update
end
|