luban 0.7.2 → 0.7.3
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 +10 -0
- data/lib/luban/deployment/cli/application/base.rb +21 -0
- data/lib/luban/deployment/cli/application/configurator.rb +17 -0
- data/lib/luban/deployment/cli/application/publisher.rb +1 -0
- data/lib/luban/deployment/helpers/utils.rb +1 -1
- data/lib/luban/deployment/templates/project/.gitignore +2 -1
- data/lib/luban/deployment/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7a8f39979ced7b6927daaf816577978103685cbf
|
4
|
+
data.tar.gz: 49e197ac74dbb02244ce6f7b46633c61ab4326d6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 64b73d9b4172745afe242fc76338334c44a0a7e229667ac04cd2ee54210c492610f795c7082d3fbbba74d1615cad8ce92fb3af1f8b97225258ba064184973b6b
|
7
|
+
data.tar.gz: f4cf86cedf713679ce2fb578c685f157932c1b940930185ab5faa8adeea67c26e7b33ca86db9b3f9d234208404952385df40f79669084535db9a18dd4bd4d2e4
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,15 @@
|
|
1
1
|
# Change log
|
2
2
|
|
3
|
+
## Version 0.7.3 (Aug 25, 2016)
|
4
|
+
|
5
|
+
New features:
|
6
|
+
* Added default/embeded source to support Ruby application like Fluentd whose source code contains Gemfile only
|
7
|
+
* Added .gitkeep to the .gitignore
|
8
|
+
|
9
|
+
Bug fixes:
|
10
|
+
* Touch the last release mtime to ensure it will NOT be deleted during release cleanup
|
11
|
+
* Fixed the helper method #cp
|
12
|
+
|
3
13
|
## Version 0.7.2 (Aug 23, 2016)
|
4
14
|
|
5
15
|
Minor enhancements:
|
@@ -100,6 +100,14 @@ module Luban
|
|
100
100
|
release_opts[version] = opts.merge(version: version)
|
101
101
|
end
|
102
102
|
|
103
|
+
def default_source_path
|
104
|
+
@default_source_path ||= config_finder[:application].stage_config_path.join('app')
|
105
|
+
end
|
106
|
+
|
107
|
+
def default_source?
|
108
|
+
has_source? and source[:from] == default_source_path
|
109
|
+
end
|
110
|
+
|
103
111
|
def has_version?(version)
|
104
112
|
release_opts.has_key?(version)
|
105
113
|
end
|
@@ -198,8 +206,16 @@ module Luban
|
|
198
206
|
show_app_environment
|
199
207
|
init_profile(args: args, opts: opts)
|
200
208
|
init_service_profiles(args: args, opts: opts)
|
209
|
+
init_source(args: args, opts: opts)
|
201
210
|
end
|
202
211
|
|
212
|
+
def init_source(args:, opts:)
|
213
|
+
if default_source?
|
214
|
+
init_source!(args: args, opts: opts.merge(source: source))
|
215
|
+
end
|
216
|
+
end
|
217
|
+
dispatch_task :init_source!, to: :configurator, as: :init_source, locally: true
|
218
|
+
|
203
219
|
def init_profile(args:, opts:)
|
204
220
|
if opts[:app] or opts[:service].nil?
|
205
221
|
init_profile!(args: args, opts: opts.merge(default_templates: default_templates))
|
@@ -248,6 +264,11 @@ module Luban
|
|
248
264
|
linked_dirs.push('log', 'pids')
|
249
265
|
end
|
250
266
|
|
267
|
+
def set_default_source
|
268
|
+
source(default_source_path, scm: :rsync)
|
269
|
+
release(stage, current: true)
|
270
|
+
end
|
271
|
+
|
251
272
|
def set_default_profile
|
252
273
|
if config_finder[:application].has_profile?
|
253
274
|
profile(config_finder[:application].stage_profile_path, scm: :rsync)
|
@@ -3,6 +3,23 @@ module Luban
|
|
3
3
|
class Application
|
4
4
|
class Configurator < Worker
|
5
5
|
include Luban::Deployment::Service::Configurator::Base
|
6
|
+
|
7
|
+
def default_source_path
|
8
|
+
task.opts.source[:from]
|
9
|
+
end
|
10
|
+
|
11
|
+
def default_source_template_path
|
12
|
+
raise NotImplementedError, "#{self.class.name}#default_source_template_path is an abstract method."
|
13
|
+
end
|
14
|
+
|
15
|
+
def init_source
|
16
|
+
if directory?(default_source_path)
|
17
|
+
puts " Skipped! ALREADY initialized #{application_name} default source"
|
18
|
+
else
|
19
|
+
puts " Initializing #{application_name} default source"
|
20
|
+
cp('-r', default_source_template_path, default_source_path)
|
21
|
+
end
|
22
|
+
end
|
6
23
|
end
|
7
24
|
end
|
8
25
|
end
|
@@ -105,6 +105,7 @@ module Luban
|
|
105
105
|
upload!(release_package_path.to_s, upload_to.to_s)
|
106
106
|
if md5_matched?(upload_to, release_md5) and
|
107
107
|
test(:tar, "-xzf #{upload_to} -C #{releases_path}")
|
108
|
+
execute(:touch, release_path)
|
108
109
|
create_symlinks
|
109
110
|
update_releases_log
|
110
111
|
else
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: luban
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.
|
4
|
+
version: 0.7.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rubyist Lei
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-08-
|
11
|
+
date: 2016-08-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: luban-cli
|