class Dapp::Dimg::Build::Stage::GALatestPatch

Public Class Methods

new(dimg, next_stage) click to toggle source
Calls superclass method Dapp::Dimg::Build::Stage::Base::new
# File lib/dapp/dimg/build/stage/ga_latest_patch.rb, line 6
def initialize(dimg, next_stage)
  @prev_stage = AfterSetupArtifact.new(dimg, self)
  super
end

Public Instance Methods

dependencies() click to toggle source
# File lib/dapp/dimg/build/stage/ga_latest_patch.rb, line 16
def dependencies
  @dependencies ||= [commit_list, git_artifacts_dev_patch_hashes]
end
empty?() click to toggle source
# File lib/dapp/dimg/build/stage/ga_latest_patch.rb, line 20
def empty?
  dimg.git_artifacts.empty? || dependencies_empty?
end
layer_commit(git_artifact) click to toggle source
# File lib/dapp/dimg/build/stage/ga_latest_patch.rb, line 24
def layer_commit(git_artifact)
  commits[git_artifact] ||= git_artifact.latest_commit
end
renew() click to toggle source
Calls superclass method Dapp::Dimg::Build::Stage::Base#renew
# File lib/dapp/dimg/build/stage/ga_latest_patch.rb, line 11
def renew
  dependencies_discard
  super
end

Private Instance Methods

commit_list() click to toggle source
# File lib/dapp/dimg/build/stage/ga_latest_patch.rb, line 30
def commit_list
  dimg.git_artifacts
    .select { |ga| ga.repo.commit_exists?(prev_stage.layer_commit(ga)) && !ga.is_patch_empty(self) }
    .map(&method(:layer_commit))
end
git_artifacts_dev_patch_hashes() click to toggle source
# File lib/dapp/dimg/build/stage/ga_latest_patch.rb, line 36
def git_artifacts_dev_patch_hashes
  # FIXME: dev-mode support in GitArtifact
  # dimg.git_artifacts.map(&:dev_patch_hash)
  nil
end