Module: EY::Strategies::Git::Helpers

Defined in:
lib/ey-deploy/strategies/git.rb

Instance Method Summary collapse

Instance Method Details

#create_revision_file_commandObject



14
15
16
# File 'lib/ey-deploy/strategies/git.rb', line 14

def create_revision_file_command
  strategy.create_revision_file_command(c.release_path)
end

#short_log_message(revision) ⇒ Object



18
19
20
# File 'lib/ey-deploy/strategies/git.rb', line 18

def short_log_message(revision)
  strategy.short_log_message(revision)
end

#strategyObject



22
23
24
25
26
27
28
29
30
31
32
33
34
35
# File 'lib/ey-deploy/strategies/git.rb', line 22

def strategy
  klass = Module.nesting[1]
  # Use [] to access attributes instead of calling methods so
  # that we get nils instead of NoMethodError.
  #
  # Rollback doesn't know about the repository location (nor
  # should it need to), but it would like to use #short_log_message.
  klass.new(
    :repository_cache => c[:repository_cache],
    :app => c[:app],
    :repo => c[:repo],
    :ref => c[:branch]
  )
end

#update_repository_cacheObject



7
8
9
10
11
12
# File 'lib/ey-deploy/strategies/git.rb', line 7

def update_repository_cache
  strategy.fetch
  unless strategy.checkout
    abort "*** [Error] Git could not checkout (#{strategy.to_checkout}) ***"
  end
end