luban 0.3.1 → 0.3.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 +4 -4
- data/CHANGELOG.md +10 -0
- data/lib/luban/deployment/cli/application/base.rb +5 -1
- data/lib/luban/deployment/cli/command.rb +5 -0
- data/lib/luban/deployment/cli/package/installer/install.rb +1 -1
- data/lib/luban/deployment/helpers/utils.rb +3 -2
- data/lib/luban/deployment/templates/envrc.erb +5 -5
- data/lib/luban/deployment/templates/unset_envrc.erb +5 -5
- 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: cc67bf3d741d713a33e8341b9599277ecfaf4ee1
|
4
|
+
data.tar.gz: bb8332a93f582506fb0644729f198a0140b6c001
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1aeb8d995bb8f820b67b9e6e4e8842eb96e755f551cbf210ae0b18541adda3da0d82ddeae9562015d25014957ef3f868986683d0db14b64819532b9d2c6c991b
|
7
|
+
data.tar.gz: 528e1d5046d8bcb96dcc03ecad0e4e772178abb8f1479e73e1a8f02118be697db59ff5f774f4abfa13721d2436b2a2bc3ffab547fd260bc233c2728e430e4252
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,15 @@
|
|
1
1
|
# Change log
|
2
2
|
|
3
|
+
## Version 0.3.2 (Apr 15, 2016)
|
4
|
+
|
5
|
+
Minor enhancements:
|
6
|
+
* Revised envrc and unset_envrc resource files
|
7
|
+
* Refactored promptless authen and environment bootstrap to task #setup from task #build
|
8
|
+
|
9
|
+
Bug fixes:
|
10
|
+
* Made required package current one to use in order to ensure proper binstubs generation
|
11
|
+
* Fixed revision calculation
|
12
|
+
|
3
13
|
## Version 0.3.1 (Apr 13, 2016)
|
4
14
|
|
5
15
|
Minor enhancements:
|
@@ -61,10 +61,14 @@ module Luban
|
|
61
61
|
promptless_authen!(args: args, opts: opts)
|
62
62
|
end
|
63
63
|
|
64
|
-
def
|
64
|
+
def setup(args:, opts:)
|
65
65
|
show_app_environment
|
66
66
|
promptless_authen(args: args, opts: opts)
|
67
67
|
build!(args: args, opts: opts)
|
68
|
+
end
|
69
|
+
|
70
|
+
def build(args:, opts:)
|
71
|
+
show_app_environment
|
68
72
|
install_all(args: args, opts: opts)
|
69
73
|
build_repositories(args: args, opts: opts)
|
70
74
|
end
|
@@ -16,6 +16,11 @@ module Luban
|
|
16
16
|
|
17
17
|
def setup_install_tasks
|
18
18
|
_self = self
|
19
|
+
task :setup do
|
20
|
+
desc "Setup #{_self.display_name} environment"
|
21
|
+
action! :setup
|
22
|
+
end
|
23
|
+
|
19
24
|
task :build do
|
20
25
|
desc "Build #{_self.display_name} environment"
|
21
26
|
switch :force, "Force to build", short: :f
|
@@ -195,7 +195,7 @@ module Luban
|
|
195
195
|
self.class.worker_class(:installer, package: d.name).new(
|
196
196
|
config: config, backend: backend,
|
197
197
|
cmd: :install, args: {},
|
198
|
-
opts: d.options.merge(name: d.name, version: d.version, parent: self)
|
198
|
+
opts: d.options.merge(name: d.name, version: d.version, current: true, parent: self)
|
199
199
|
).run
|
200
200
|
end
|
201
201
|
end
|
@@ -118,7 +118,8 @@ module Luban
|
|
118
118
|
def upload_by_template(file_to_upload:, template_file:, auto_revision: false, **opts)
|
119
119
|
template = File.read(template_file)
|
120
120
|
|
121
|
-
if auto_revision
|
121
|
+
if auto_revision
|
122
|
+
require 'digest/md5'
|
122
123
|
revision = Digest::MD5.hexdigest(template)
|
123
124
|
return if revision_match?(file_to_upload, revision)
|
124
125
|
end
|
@@ -130,7 +131,7 @@ module Luban
|
|
130
131
|
end
|
131
132
|
|
132
133
|
def revision_match?(file_to_upload, revision)
|
133
|
-
match?("grep \"Revision: \" #{file_to_upload}", revision)
|
134
|
+
file?(file_to_upload) and match?("grep \"Revision: \" #{file_to_upload}", revision)
|
134
135
|
end
|
135
136
|
|
136
137
|
[:test, :make, :within, :with, :as, :execute,
|
@@ -1,4 +1,5 @@
|
|
1
|
-
#
|
1
|
+
# Luban environment activation resource file
|
2
|
+
# Environment: <%= env_name = "#{stage}.#{project}/#{application}" %>
|
2
3
|
# Revision: <%= revision %>
|
3
4
|
# Created at <%= Time.now().strftime("%d/%m/%Y %H:%M:%S") %>
|
4
5
|
|
@@ -10,10 +11,10 @@ echo_line() {
|
|
10
11
|
|
11
12
|
if [ -n "${LUBAN_ROOT:+x}" ]; then
|
12
13
|
if [[ "$LUBAN_ROOT" == "<%= app_path %>" ]]; then
|
13
|
-
echo_line "
|
14
|
+
echo_line "Environment <%= env_name %> has ALREADY been activated!"
|
14
15
|
else
|
15
16
|
local current_env=${LUBAN_ROOT##*env/}
|
16
|
-
echo_line "
|
17
|
+
echo_line "Environment $current_env is STILL active!"
|
17
18
|
echo_line "Please de-activate it first:"
|
18
19
|
echo_line "\tunset_lubenv $current_env"
|
19
20
|
echo_line "\t\tor"
|
@@ -25,6 +26,5 @@ else
|
|
25
26
|
export LUBAN_ROOT
|
26
27
|
export PATH
|
27
28
|
|
28
|
-
echo_line "
|
29
|
+
echo_line "Environment <%= env_name %> is activated!"
|
29
30
|
fi
|
30
|
-
|
@@ -1,4 +1,5 @@
|
|
1
|
-
#
|
1
|
+
# Environment de-activation resource file
|
2
|
+
# Environment: <%= env_name = "#{stage}.#{project}/#{application}" %>
|
2
3
|
# Revision: <%= revision %>
|
3
4
|
# Created at <%= Time.now().strftime("%d/%m/%Y %H:%M:%S") %>
|
4
5
|
|
@@ -13,16 +14,15 @@ if [ -n "${LUBAN_ROOT:+x}" ]; then
|
|
13
14
|
PATH=${PATH//$LUBAN_ROOT\/bin:/}
|
14
15
|
unset LUBAN_ROOT
|
15
16
|
export PATH
|
16
|
-
echo_line "
|
17
|
+
echo_line "Environment <%= env_name %> is de-activated!"
|
17
18
|
else
|
18
19
|
local current_env=${LUBAN_ROOT##*env/}
|
19
|
-
echo_line "ACTUALLY,
|
20
|
+
echo_line "ACTUALLY, environment $curent_env is active!"
|
20
21
|
echo_line "Please run the following command instead to de-activate it:"
|
21
22
|
echo_line "\tunset_lubenv $current_env"
|
22
23
|
echo_line "\t\tor"
|
23
24
|
echo_line "\tsource $LUBAN_ROOT/.unset_envrc"
|
24
25
|
fi
|
25
26
|
else
|
26
|
-
echo_line "
|
27
|
+
echo_line "Environment <%= env_name %> has ALREADY been de-activated!"
|
27
28
|
fi
|
28
|
-
|
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.3.
|
4
|
+
version: 0.3.2
|
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-04-
|
11
|
+
date: 2016-04-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: luban-cli
|