marionetta 0.3.5 → 0.3.6

Sign up to get free protection for your applications and to get access to all the features.
@@ -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
@@ -24,7 +24,8 @@
24
24
  # [author]: http://lukemorton.co.uk
25
25
  # [github]: https://github.com/DrPheltRight/marionetta
26
26
  module Marionetta
27
- VERSION = '0.3.5'
27
+
28
+ VERSION = '0.3.6'
28
29
 
29
30
  ### Defining Servers
30
31
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: marionetta
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.5
4
+ version: 0.3.6
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: