luban 0.7.10 → 0.7.11
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 +4 -4
- data/CHANGELOG.md +6 -0
- data/lib/luban/deployment/cli/application/publisher.rb +3 -11
- data/lib/luban/deployment/cli/application/worker.rb +15 -1
- data/lib/luban/deployment/cli/command.rb +0 -1
- data/lib/luban/deployment/cli/service/worker.rb +5 -0
- data/lib/luban/deployment/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 965accf9f688c3645de9f50c82c60c9cc892e586
|
4
|
+
data.tar.gz: 8d63a832e8afbeb809ddf81ddc7ed28a91d93ae3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 02830ccd54bfed7f6eb99a1306ac86576473f08b1f38cb538e20fe28670bbd9c43a5fe029d9b0f7ae73ee4f41f5ac1834cb58e5de5249e5d4aec49c397de3362
|
7
|
+
data.tar.gz: 866dd03727416032e174471cd431dbe055c620800d0b67caf70a4cb504b77ce3b7c4928ac37b603fadcae8028b85ce82a83fb0cddd9c69c0510c5d9369193c81
|
data/CHANGELOG.md
CHANGED
@@ -29,14 +29,6 @@ module Luban
|
|
29
29
|
@releases_log_path ||= app_path.join('releases.log')
|
30
30
|
end
|
31
31
|
|
32
|
-
def gemfile
|
33
|
-
@gemfile ||= release_path.join('Gemfile')
|
34
|
-
end
|
35
|
-
|
36
|
-
def bundle_cmd
|
37
|
-
@bundle_cmd ||= app_bin_path.join('bundle')
|
38
|
-
end
|
39
|
-
|
40
32
|
def bundle_config_path
|
41
33
|
@bundle_config_path ||= shared_path.join('.bundle')
|
42
34
|
end
|
@@ -119,7 +111,7 @@ module Luban
|
|
119
111
|
|
120
112
|
def create_symlinks
|
121
113
|
send("create_#{release_type}_symlinks")
|
122
|
-
if
|
114
|
+
if has_gemfile?
|
123
115
|
create_linked_dirs(bundle_linked_dirs, from: shared_path, to: release_path)
|
124
116
|
end
|
125
117
|
end
|
@@ -204,12 +196,12 @@ module Luban
|
|
204
196
|
options = []
|
205
197
|
options << "--gemfile #{gemfile}"
|
206
198
|
options << "--path #{bundle_path}"
|
207
|
-
unless test(
|
199
|
+
unless test(bundle_executable, :check, *options)
|
208
200
|
unless bundle_without.include?(stage.to_s)
|
209
201
|
options << "--without #{bundle_without.join(' ')}"
|
210
202
|
end
|
211
203
|
options << bundle_flags.join(' ')
|
212
|
-
execute(
|
204
|
+
execute(bundle_executable, :install, *options)
|
213
205
|
end
|
214
206
|
end
|
215
207
|
end
|
@@ -5,8 +5,14 @@ module Luban
|
|
5
5
|
include Luban::Deployment::Worker::Paths::Remote
|
6
6
|
include Luban::Deployment::Service::Worker::Base
|
7
7
|
|
8
|
+
def gemfile
|
9
|
+
@gemfile ||= release_path.join('Gemfile')
|
10
|
+
end
|
11
|
+
|
12
|
+
def has_gemfile?; file?(gemfile); end
|
13
|
+
|
8
14
|
def shell_setup_commands
|
9
|
-
super << "cd #{release_path}"
|
15
|
+
@shell_setup_commands ||= super << "cd #{release_path}"
|
10
16
|
end
|
11
17
|
|
12
18
|
%i(name full_name version major_version patch_level).each do |method|
|
@@ -24,6 +30,14 @@ module Luban
|
|
24
30
|
def release_path
|
25
31
|
@release_path ||= releases_path.join(release_tag)
|
26
32
|
end
|
33
|
+
|
34
|
+
def ruby_bin_path
|
35
|
+
@ruby_bin_path ||= package_bin_path('ruby')
|
36
|
+
end
|
37
|
+
|
38
|
+
def bundle_executable
|
39
|
+
@bundle_executable ||= ruby_bin_path.join('bundle')
|
40
|
+
end
|
27
41
|
end
|
28
42
|
end
|
29
43
|
end
|
@@ -7,7 +7,12 @@ module Luban
|
|
7
7
|
@shell_setup_commands ||= ["source #{envrc_file}"]
|
8
8
|
end
|
9
9
|
|
10
|
+
def shell_command_prefix
|
11
|
+
@shell_command_prefix ||= []
|
12
|
+
end
|
13
|
+
|
10
14
|
def compose_command(cmd)
|
15
|
+
cmd = "#{shell_command_prefix.join(' ')} #{cmd}" unless shell_command_prefix.empty?
|
11
16
|
"#{shell_setup_commands.join(' && ')} && #{cmd} 2>&1"
|
12
17
|
end
|
13
18
|
|