dapp 0.32.0 → 0.32.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7836539f8a917786c4db7778853720687f41b3dc80eaaddee4b7e9cf13a7e8f5
4
- data.tar.gz: 84eec391c97ddebb98732b6dc8729f606a7cbbb2c5eaf1c4b398e4a22de30736
3
+ metadata.gz: e53bf1f4f23e9c9d6a142cf56aad7fefb1c704405b3e633da4c46a6848d00380
4
+ data.tar.gz: f7d77efca8a9921229699d9c80afa45464a2caf3ced3a201dc9c1c4c53a84386
5
5
  SHA512:
6
- metadata.gz: e44e256557b647a045f379df38c06f88ad2911a49e691112e3ce3d970ccc4afcf8f09d2f0381478924f41560d50c58bd8fb66ce97951a4a68ae280548ef70e70
7
- data.tar.gz: 37d984525171b58ba24a6ea18a208b87f4e50de784ed8098958c9df0c2eb9893cc3b12ec95b4f2d17ebde90c7785299dd563f1c9168dbc0f8e02aefda1d3b108
6
+ metadata.gz: efc034a6c62b2ece90d2d5bfa25d26f444249b10b7102fc9abe1b42fe6711417fa86faa18c999590070682839ebd0757130d6a0867e6c1f7bf9441fcb8903ca1
7
+ data.tar.gz: 7addc6c0444189fd08780cbb3bb009b1c16e6c09265b332c7c9bb10f37dc359a32a2c32202e3a21a1549a93bf5d32382cf2607e96b957f3ae56b489fec625a0a
@@ -4,7 +4,7 @@ module Dapp
4
4
  module Stage
5
5
  class From < Base
6
6
  def dependencies
7
- @dependencies ||= [from_image_name, dimg.config._docker._from_cache_version, config_mounts_dirs]
7
+ @dependencies ||= [from_image_name, dimg.config._docker._from_cache_version, config_mounts]
8
8
  end
9
9
 
10
10
  protected
@@ -48,8 +48,15 @@ module Dapp
48
48
  "#{dimg.dapp.mkdir_bin} -p %s"].map { |c| format(c, config_mounts_dirs.join(' ')) }
49
49
  end
50
50
 
51
+ def config_mounts
52
+ {}.tap do |mounts|
53
+ [:tmp_dir, :build_dir].map { |type| mounts[type] = config_mounts_by_type(type) }
54
+ config_custom_dir_mounts.each { |from, to| mounts[from] = to }
55
+ end
56
+ end
57
+
51
58
  def config_mounts_dirs
52
- ([:tmp_dir, :build_dir].map { |type| config_mounts_by_type(type) } + config_custom_dir_mounts.map(&:last)).flatten.uniq
59
+ config_mounts.values.flatten.uniq
53
60
  end
54
61
 
55
62
  def adding_mounts_by_type(_type)
@@ -56,8 +56,13 @@ module Dapp
56
56
  def submodule_params(submodule)
57
57
  {}.tap do |params|
58
58
  params[:path] = submodule.path
59
- params[:url] = submodule_url(submodule.url)
60
- params[:type] = begin
59
+ params[:url] = begin
60
+ params_url = submodule_url(submodule.url)
61
+ params_url = "#{params_url}.git" if url_protocol(params[:url]) != :noname && !params_url.end_with?('.git')
62
+ params_url
63
+ end # https://github.com/libgit2/rugged/issues/761
64
+
65
+ params[:type] = begin
61
66
  if url_protocol(params[:url]) == :noname
62
67
  submodule_absolute_path = File.join(File.dirname(path), params[:path])
63
68
  dapp.log_warning(desc: { code: :submodule_url_scheme_not_detected,
@@ -38,6 +38,14 @@ module Dapp
38
38
  end.compact
39
39
  end
40
40
 
41
+ def submodules_git(commit)
42
+ if commit.nil?
43
+ git
44
+ else
45
+ super
46
+ end
47
+ end
48
+
41
49
  def raise_submodule_commit_not_found!(commit)
42
50
  raise Error::Rugged, code: :git_local_submodule_commit_not_found, data: { commit: commit, path: path }
43
51
  end
data/lib/dapp/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  module Dapp
2
- VERSION = "0.32.0"
2
+ VERSION = "0.32.1"
3
3
  BUILD_CACHE_VERSION = 31
4
4
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dapp
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.32.0
4
+ version: 0.32.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dmitry Stolyarov
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-08-07 00:00:00.000000000 Z
11
+ date: 2018-08-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: mixlib-shellout