Module: CapistranoGitExternal::GitPatch::InstanceMethods

Defined in:
lib/capistrano-git-external/git-patch.rb

Instance Method Summary collapse

Instance Method Details

#add_git_external_commands(method_name, revision, destination) ⇒ Object



20
21
22
23
24
25
26
27
28
29
30
31
32
# File 'lib/capistrano-git-external/git-patch.rb', line 20

def add_git_external_commands(method_name, revision, destination)
  git = command
  execute = []

  execute << self.send(method_name, revision, destination)

  if variable(:git_enable_externals)
    execute << "#{git} external init"
    execute << "#{git} external update"
  end

  execute.join(" && ")
end

#checkout_with_externals(revision, destination) ⇒ Object



34
35
36
# File 'lib/capistrano-git-external/git-patch.rb', line 34

def checkout_with_externals(revision, destination)
  add_git_external_commands(:checkout_without_externals, revision, destination)
end

#sync_with_externals(revision, destination) ⇒ Object



38
39
40
# File 'lib/capistrano-git-external/git-patch.rb', line 38

def sync_with_externals(revision, destination)
  add_git_external_commands(:sync_without_externals, revision, destination)
end