marionetta 0.3.5 → 0.3.6
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/marionetta/manipulators/deployer.rb +5 -10
- data/lib/marionetta.rb +2 -1
- metadata +1 -1
@@ -24,9 +24,8 @@ module Marionetta
|
|
24
24
|
end
|
25
25
|
|
26
26
|
def deploy()
|
27
|
-
run_script(:before)
|
28
|
-
|
29
27
|
release = timestamp
|
28
|
+
|
30
29
|
create_tmp_release_dir(release)
|
31
30
|
|
32
31
|
cmd.ssh("mkdir -p #{release_dir}")
|
@@ -35,9 +34,9 @@ module Marionetta
|
|
35
34
|
fatal('Could not rsync release')
|
36
35
|
end
|
37
36
|
|
37
|
+
run_script(:before, release)
|
38
38
|
symlink_release_dir(release)
|
39
|
-
|
40
|
-
run_script(:after)
|
39
|
+
run_script(:after, release)
|
41
40
|
end
|
42
41
|
|
43
42
|
def releases()
|
@@ -81,10 +80,6 @@ module Marionetta
|
|
81
80
|
"/tmp/#{release}"
|
82
81
|
end
|
83
82
|
|
84
|
-
def tmp_release_archive(release)
|
85
|
-
"/tmp/#{release}.tar.gz"
|
86
|
-
end
|
87
|
-
|
88
83
|
def to_dir()
|
89
84
|
server[:deployer][:to]
|
90
85
|
end
|
@@ -105,14 +100,14 @@ module Marionetta
|
|
105
100
|
exit(1)
|
106
101
|
end
|
107
102
|
|
108
|
-
def run_script(script)
|
103
|
+
def run_script(script, release)
|
109
104
|
script_key = "#{script}_script".to_sym
|
110
105
|
|
111
106
|
if server[:deployer].has_key?(script_key)
|
112
107
|
script = server[:deployer][script_key]
|
113
108
|
cmd.put(script, '/tmp')
|
114
109
|
tmp_script = "/tmp/#{File.basename(script)}"
|
115
|
-
cmd.ssh("chmod +x #{tmp_script} && exec #{tmp_script}")
|
110
|
+
cmd.ssh("chmod +x #{tmp_script} && exec #{tmp_script} #{release}")
|
116
111
|
end
|
117
112
|
end
|
118
113
|
|
data/lib/marionetta.rb
CHANGED