dapp 0.21.1 → 0.21.2
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
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6688aeaeb3fbb8ac79e79ebfb3a962fac517c837502baf782f63ba6ad0f66422
|
4
|
+
data.tar.gz: 51c4ec39d9f8a76d28e86d8c1b5c58003b62cb695759a8d2ea8fe059947bc5f0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d9a403972969a94073332d428d83d641bceb4e5b0c23b036dc28db0b7bcd65e11e7337e97a0dad7598b72e063eba32c2adf1396d1bc644e523f82996750fe77d
|
7
|
+
data.tar.gz: 0c17e98a0a94b63999cf00d620b60472f45064f7f8ca98c6f61a2a0206059df98e97a22842d15ed3d1007cbf5cdd5c6e04b758ffd55f78d384a3cf4adf382ab4
|
@@ -7,9 +7,13 @@ module Dapp
|
|
7
7
|
end
|
8
8
|
end
|
9
9
|
|
10
|
-
def
|
10
|
+
def dimgstage_g_a_commit_label(paramshash)
|
11
11
|
"dapp-git-#{paramshash}-commit"
|
12
12
|
end
|
13
|
+
|
14
|
+
def dimgstage_g_a_type_label(paramshash)
|
15
|
+
"dapp-git-#{paramshash}-type"
|
16
|
+
end
|
13
17
|
end # GitArtifact
|
14
18
|
end # Dapp
|
15
19
|
end # Dapp
|
@@ -191,7 +191,7 @@ module Dapp
|
|
191
191
|
def layer_commit(git_artifact)
|
192
192
|
commits[git_artifact] ||= begin
|
193
193
|
if image.tagged?
|
194
|
-
image.labels[dimg.dapp.
|
194
|
+
image.labels[dimg.dapp.dimgstage_g_a_commit_label(git_artifact.paramshash)]
|
195
195
|
else
|
196
196
|
git_artifact.latest_commit
|
197
197
|
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.
|
13
|
+
image.add_service_change_label(dimg.dapp.dimgstage_g_a_commit_label(git_artifact.paramshash).to_sym => git_artifact.latest_commit)
|
14
14
|
image.add_command git_artifact.send(apply_command_method, self)
|
15
15
|
end
|
16
16
|
end
|
@@ -72,7 +72,7 @@ module Dapp
|
|
72
72
|
dimgs.each do |dimg|
|
73
73
|
[dimg, dimg.artifacts].flatten
|
74
74
|
.map(&:git_artifacts).flatten
|
75
|
-
.map { |
|
75
|
+
.map { |git_artifact| repositories[dimgstage_g_a_commit_label(git_artifact.paramshash)] = git_artifact.repo }
|
76
76
|
end
|
77
77
|
end
|
78
78
|
end
|
@@ -65,12 +65,12 @@ module Dapp
|
|
65
65
|
if archive_any_changes?(stage)
|
66
66
|
case cwd_type(stage)
|
67
67
|
when :directory
|
68
|
-
stage.image.add_service_change_label
|
68
|
+
stage.image.add_service_change_label(repo.dapp.dimgstage_g_a_type_label(paramshash).to_sym => 'directory')
|
69
69
|
|
70
70
|
commands << "#{repo.dapp.install_bin} #{credentials.join(' ')} -d \"#{to}\""
|
71
71
|
commands << "#{sudo}#{repo.dapp.tar_bin} -xf #{archive_file(stage, *archive_stage_commit(stage))} -C \"#{to}\""
|
72
72
|
when :file
|
73
|
-
stage.image.add_service_change_label
|
73
|
+
stage.image.add_service_change_label(repo.dapp.dimgstage_g_a_type_label(paramshash).to_sym => 'file')
|
74
74
|
|
75
75
|
commands << "#{repo.dapp.install_bin} #{credentials.join(' ')} -d \"#{File.dirname(to)}\""
|
76
76
|
commands << "#{sudo}#{repo.dapp.tar_bin} -xf #{archive_file(stage, *archive_stage_commit(stage))} -C \"#{File.dirname(to)}\""
|
@@ -79,15 +79,15 @@ module Dapp
|
|
79
79
|
end
|
80
80
|
end
|
81
81
|
|
82
|
-
def archive_type
|
83
|
-
|
82
|
+
def archive_type(stage)
|
83
|
+
stage.prev_stage.image.labels[repo.dapp.dimgstage_g_a_type_label(paramshash)].to_s.to_sym
|
84
84
|
end
|
85
85
|
|
86
86
|
def apply_patch_command(stage)
|
87
87
|
[].tap do |commands|
|
88
88
|
if dev_mode?
|
89
89
|
if any_changes?(*dev_patch_stage_commits(stage))
|
90
|
-
case archive_type
|
90
|
+
case archive_type(stage)
|
91
91
|
when :directory
|
92
92
|
changed_files = diff_patches(*dev_patch_stage_commits(stage)).map {|p| "\"#{File.join(to, cwd, p.delta.new_file[:path])}\""}
|
93
93
|
commands << "#{repo.dapp.rm_bin} -rf #{changed_files.join(' ')}"
|
@@ -103,7 +103,7 @@ module Dapp
|
|
103
103
|
end
|
104
104
|
else
|
105
105
|
if patch_any_changes?(stage)
|
106
|
-
case archive_type
|
106
|
+
case archive_type(stage)
|
107
107
|
when :directory
|
108
108
|
commands << "#{repo.dapp.install_bin} #{credentials.join(' ')} -d \"#{to}\""
|
109
109
|
commands << "#{sudo}#{repo.dapp.git_bin} apply --whitespace=nowarn --directory=\"#{to}\" --unsafe-paths #{patch_file(stage, *patch_stage_commits(stage))}"
|
@@ -296,7 +296,7 @@ module Dapp
|
|
296
296
|
modify_patch_line = proc do |line_number, path_char|
|
297
297
|
action_part, path_part = lines[line_number].strip.split(' ', 2)
|
298
298
|
if (path_with_cwd = path_part.partition("#{path_char}/").last).start_with?(cwd)
|
299
|
-
native_path = case archive_type
|
299
|
+
native_path = case archive_type(stage)
|
300
300
|
when :directory
|
301
301
|
path_with_cwd.sub(cwd, '')
|
302
302
|
when :file
|
data/lib/dapp/version.rb
CHANGED
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.21.
|
4
|
+
version: 0.21.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dmitry Stolyarov
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-11-
|
11
|
+
date: 2017-11-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: mixlib-shellout
|