ey-deploy 0.6.0 → 0.6.1
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.
- data/lib/ey-deploy/deploy.rb +4 -1
- data/lib/ey-deploy/strategies/git.rb +6 -1
- data/lib/ey-deploy/version.rb +1 -1
- metadata +3 -3
data/lib/ey-deploy/deploy.rb
CHANGED
|
@@ -98,11 +98,14 @@ module EY
|
|
|
98
98
|
roles :app_master, :app, :solo do
|
|
99
99
|
restart_command = case c.stack
|
|
100
100
|
when "nginx_unicorn"
|
|
101
|
+
sudo(%Q{if [ ! -d /proc/`cat /var/run/engineyard/unicorn_#{c.app}.pid` ]; then rm -f /var/run/engineyard/unicorn_#{c.app}.pid; fi})
|
|
101
102
|
sudo("/etc/init.d/unicorn_#{c.app} deploy")
|
|
102
103
|
when "nginx_mongrel"
|
|
103
104
|
sudo("monit restart all -g #{c.app}")
|
|
104
|
-
when "nginx_passenger"
|
|
105
|
+
when "nginx_passenger"
|
|
105
106
|
sudo("touch #{c.latest_release}/tmp/restart.txt")
|
|
107
|
+
else
|
|
108
|
+
raise "Unknown stack #{c.stack}; restart failed!"
|
|
106
109
|
end
|
|
107
110
|
end
|
|
108
111
|
@restart_failed = false
|
|
@@ -33,10 +33,15 @@ module EY
|
|
|
33
33
|
set_up_git_ssh(@opts[:app])
|
|
34
34
|
end
|
|
35
35
|
|
|
36
|
+
def usable_repository?
|
|
37
|
+
File.directory?(opts[:repository_cache]) && `#{git} remote -v | grep origin`[opts[:repo]]
|
|
38
|
+
end
|
|
39
|
+
|
|
36
40
|
def fetch
|
|
37
|
-
if
|
|
41
|
+
if usable_repository?
|
|
38
42
|
system("#{git} fetch origin")
|
|
39
43
|
else
|
|
44
|
+
FileUtils.rm_rf(opts[:repository_cache])
|
|
40
45
|
system("git clone #{opts[:repo]} #{opts[:repository_cache]}")
|
|
41
46
|
end
|
|
42
47
|
end
|
data/lib/ey-deploy/version.rb
CHANGED
metadata
CHANGED
|
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
|
5
5
|
segments:
|
|
6
6
|
- 0
|
|
7
7
|
- 6
|
|
8
|
-
-
|
|
9
|
-
version: 0.6.
|
|
8
|
+
- 1
|
|
9
|
+
version: 0.6.1
|
|
10
10
|
platform: ruby
|
|
11
11
|
authors:
|
|
12
12
|
- EY Cloud Team
|
|
@@ -14,7 +14,7 @@ autorequire:
|
|
|
14
14
|
bindir: bin
|
|
15
15
|
cert_chain: []
|
|
16
16
|
|
|
17
|
-
date: 2010-06-
|
|
17
|
+
date: 2010-06-23 00:00:00 -07:00
|
|
18
18
|
default_executable: eysd
|
|
19
19
|
dependencies:
|
|
20
20
|
- !ruby/object:Gem::Dependency
|