Module: Dapp::Project::Deps::Gitartifact

Included in:
Dapp::Project
Defined in:
lib/dapp/project/deps/gitartifact.rb

Overview

Gitartifact

Constant Summary collapse

GITARTIFACT_VERSION =
'0.1.7'.freeze

Instance Method Summary collapse

Instance Method Details

#git_binObject



30
31
32
# File 'lib/dapp/project/deps/gitartifact.rb', line 30

def git_bin
  "/.dapp/deps/gitartifact/#{GITARTIFACT_VERSION}/bin/git"
end

#gitartifact_containerObject



14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# File 'lib/dapp/project/deps/gitartifact.rb', line 14

def gitartifact_container
  @gitartifact_container ||= begin
    if shellout("docker inspect #{gitartifact_container_name}").exitstatus.nonzero?
      log_secondary_process(t(code: 'process.gitartifact_container_creating'), short: true) do
        shellout!(
          ['docker create',
           "--name #{gitartifact_container_name}",
           "--volume /.dapp/deps/gitartifact/#{GITARTIFACT_VERSION}",
           "dappdeps/gitartifact:#{GITARTIFACT_VERSION}"].join(' ')
        )
      end
    end
    gitartifact_container_name
  end
end

#gitartifact_container_nameObject

FIXME: hashsum(image) or dockersafe()



10
11
12
# File 'lib/dapp/project/deps/gitartifact.rb', line 10

def gitartifact_container_name # FIXME: hashsum(image) or dockersafe()
  "dappdeps_gitartifact_#{GITARTIFACT_VERSION}"
end