dapp 0.27.0 → 0.27.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 745c76163ba1b96d6a8a73c478d7ea9de5a9aa32
4
- data.tar.gz: d3ec2e586c4828ecd4044a7abf69109eb64f2cbc
3
+ metadata.gz: e0a054313430584b23e761f254913b80a57ecfc3
4
+ data.tar.gz: a4945c4837361278b2653fb91d161c5bc34e22f7
5
5
  SHA512:
6
- metadata.gz: 32391a66ad27f57986540b813cec39d279cd549224cc1d8b3fbc9b8fcbb50f50a5aae2692f90948e7fff2594668b5ba245dcb62d1f3b4ae31f242d9b35fba3be
7
- data.tar.gz: 33b1e5a759aacd3f183d45869eedb475462b52615b7182f5931e25835ae0f0368f5726d6026c0f2d6d95487b8a39b65a5ce16502dee38999f68d385b6044358c
6
+ metadata.gz: dcb3d7d9da637efd3e4357d6176af9af5158796de59912641f511facc61a6fcd11087e3d7c5a068e804f4ccff2bd3c7a5fd5237161c85c168b5e210c759f1fab
7
+ data.tar.gz: 3bf56658b7dc5cde6ca97bbdeb42771e74291f3f49959a155f9bcf9cf422a20aae6ebbaeb7c469e920369b5ce61c99ee012ff7e7dbd946f7867e4aed8feab9c9
@@ -189,8 +189,10 @@ module Dapp
189
189
  commits[git_artifact] ||= begin
190
190
  if image.built?
191
191
  image.labels[dimg.dapp.dimgstage_g_a_commit_label(git_artifact.paramshash)]
192
- else
192
+ elsif g_a_stage? && !empty?
193
193
  git_artifact.latest_commit
194
+ elsif prev_stage
195
+ prev_stage.layer_commit(git_artifact)
194
196
  end
195
197
  end
196
198
  end
@@ -10,7 +10,7 @@ module Dapp
10
10
  image.add_volume "#{dimg.tmp_path('patches')}:#{dimg.container_tmp_path('patches')}:ro"
11
11
 
12
12
  dimg.git_artifacts.each do |git_artifact|
13
- image.add_service_change_label(dimg.dapp.dimgstage_g_a_commit_label(git_artifact.paramshash).to_sym => git_artifact.latest_commit)
13
+ image.add_service_change_label(dimg.dapp.dimgstage_g_a_commit_label(git_artifact.paramshash).to_sym => layer_commit(git_artifact))
14
14
  image.add_command git_artifact.send(apply_command_method, self)
15
15
  end
16
16
  end
@@ -28,7 +28,9 @@ module Dapp
28
28
  private
29
29
 
30
30
  def commit_list
31
- dimg.git_artifacts.map { |git_artifact| layer_commit(git_artifact) }
31
+ dimg.git_artifacts
32
+ .map { |git_artifact| layer_commit(git_artifact) if git_artifact.patch_any_changes?(self) }
33
+ .compact
32
34
  end
33
35
 
34
36
  def git_artifacts_dev_patch_hashes
@@ -129,6 +129,7 @@ module Dapp
129
129
  end
130
130
 
131
131
  def remove_base(query_format, ids, force: false)
132
+ return if ids.empty?
132
133
  force_option = force ? ' -f' : ''
133
134
  log(ids.join("\n")) if log_verbose? || dry_run?
134
135
  run_command(format(query_format, force_option: force_option, ids: ids.join(' ')))
@@ -104,12 +104,12 @@ module Dapp
104
104
 
105
105
  def patches(from, to, paths: [], exclude_paths: [], **kwargs)
106
106
  diff(from, to, **kwargs).patches.select do |patch|
107
- ignore_patch?(patch, paths: paths, exclude_paths: exclude_paths)
107
+ !ignore_patch?(patch, paths: paths, exclude_paths: exclude_paths)
108
108
  end
109
109
  end
110
110
 
111
111
  def ignore_patch?(patch, paths: [], exclude_paths: [])
112
- !ignore_path?(patch.delta.new_file[:path], paths: paths, exclude_paths: exclude_paths)
112
+ ignore_path?(patch.delta.new_file[:path], paths: paths, exclude_paths: exclude_paths)
113
113
  end
114
114
 
115
115
  def entries(commit, paths: [], exclude_paths: [])
@@ -48,9 +48,9 @@ module Dapp
48
48
  delta_new_file = patch.delta.new_file
49
49
  args = [delta_new_file[:path], paths: paths, exclude_paths: exclude_paths]
50
50
  if nested_git_repository_mode?(delta_new_file[:mode])
51
- !ignore_directory?(*args)
51
+ ignore_directory?(*args)
52
52
  else
53
- !ignore_path?(*args)
53
+ ignore_path?(*args)
54
54
  end
55
55
  end
56
56
 
data/lib/dapp/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  module Dapp
2
- VERSION = "0.27.0"
3
- BUILD_CACHE_VERSION = 27
2
+ VERSION = "0.27.1"
3
+ BUILD_CACHE_VERSION = 28
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.27.0
4
+ version: 0.27.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-03-07 00:00:00.000000000 Z
11
+ date: 2018-03-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: mixlib-shellout