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

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

Constant Summary collapse

GITARTIFACT_VERSION =
'0.1.7'.freeze

Instance Method Summary collapse

Instance Method Details

#git_binObject



27
28
29
# File 'lib/dapp/dapp/deps/gitartifact.rb', line 27

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

#gitartifact_containerObject



11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# File 'lib/dapp/dapp/deps/gitartifact.rb', line 11

def gitartifact_container
  @gitartifact_container ||= begin
    if shellout("#{host_docker} inspect #{gitartifact_container_name}").exitstatus.nonzero?
      log_secondary_process(t(code: 'process.gitartifact_container_creating'), short: true) do
        shellout!(
          ["#{host_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()



7
8
9
# File 'lib/dapp/dapp/deps/gitartifact.rb', line 7

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