Module: Dapp::Application::GitArtifact

Included in:
Dapp::Application
Defined in:
lib/dapp/application/git_artifact.rb

Overview

GitArtifact

Instance Method Summary collapse

Instance Method Details

#git_artifactsObject



6
7
8
# File 'lib/dapp/application/git_artifact.rb', line 6

def git_artifacts
  [*local_git_artifacts, *remote_git_artifacts].compact
end

#local_git_artifactsObject



10
11
12
13
14
15
# File 'lib/dapp/application/git_artifact.rb', line 10

def local_git_artifacts
  @local_git_artifact_list ||= Array(config._git_artifact._local).map do |ga_config|
    repo = GitRepo::Own.new(self)
    Dapp::GitArtifact.new(repo, **ga_config._artifact_options)
  end
end

#remote_git_artifactsObject



17
18
19
20
21
22
23
# File 'lib/dapp/application/git_artifact.rb', line 17

def remote_git_artifacts
  @remote_git_artifact_list ||= Array(config._git_artifact._remote).map do |ga_config|
    repo = GitRepo::Remote.new(self, ga_config._name, url: ga_config._url)
    repo.fetch!(ga_config._branch)
    Dapp::GitArtifact.new(repo, **ga_config._artifact_options)
  end
end