Class: Shipitron::Server::Git::CloneLocalCopy

Inherits:
Object
  • Object
show all
Includes:
Metaractor
Defined in:
lib/shipitron/server/git/clone_local_copy.rb

Instance Method Summary collapse

Instance Method Details

#callObject



19
20
21
22
23
24
25
26
27
28
# File 'lib/shipitron/server/git/clone_local_copy.rb', line 19

def call
  Logger.info "Using this branch: #{repository_branch}"
  FileUtils.cd('/home/shipitron') do
    `git clone git-cache #{Shellwords.escape application} --recursive --branch #{Shellwords.escape repository_branch}`
  end

  Logger.info 'Using this git commit:'
  context.git_info = GitInfo.from_path(path: "/home/shipitron/#{application}")
  Logger.info context.git_info.one_liner
end