capistrano-unformatt 1.5 → 1.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/capistrano-unformatt.gemspec +1 -1
- data/lib/capistrano/tasks/setup.rake +27 -21
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5202bff3be5601c4adbefe63f822118d36fe4487
|
4
|
+
data.tar.gz: 41f6ab7d6abdd62a04d03112fc9846e11a6f2690
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7bc83f3da390b43987c1ed07843e3f3804b04e7936b71d79bc8a851d1b69e46c5a616c5cb32b1ac6f23dbf058b9920010472cd0a4d3b140f2594d1d5ace95719
|
7
|
+
data.tar.gz: 81f415e17d0c3de5351f7f380419b706c1dae16fc09698604756048918cba777a2dc2e4211d50681b6d2857ba1c741c1a77b15419c155457b45756a1dbdb46dc
|
data/CHANGELOG.md
CHANGED
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
4
|
|
5
5
|
Gem::Specification.new do |spec|
|
6
6
|
spec.name = "capistrano-unformatt"
|
7
|
-
spec.version = '1.
|
7
|
+
spec.version = '1.6'
|
8
8
|
spec.authors = ["unformatt"]
|
9
9
|
spec.email = ["unformatt@gmail.com"]
|
10
10
|
spec.description = "Custom recipes for Unformatt projects"
|
@@ -7,32 +7,38 @@ namespace :deploy do
|
|
7
7
|
# yaml files
|
8
8
|
execute "mkdir -p #{shared_path}/{config,tmp}"
|
9
9
|
|
10
|
-
|
11
|
-
|
10
|
+
unless ENV['SKIP_YAML'] == 'true'
|
11
|
+
fetch(:setup_yamls, []).each do |yaml|
|
12
|
+
template "#{yaml}.yml.erb", "#{shared_path}/config/#{yaml}.yml"
|
13
|
+
end
|
12
14
|
end
|
13
15
|
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
16
|
+
unless ENV['SKIP_DAEMONS'] == 'true'
|
17
|
+
fetch(:setup_daemons, []).each do |daemon|
|
18
|
+
if daemon[:config] == true
|
19
|
+
template "#{daemon[:name]}.rb.erb", "#{shared_path}/config/#{daemon[:name]}.rb", 0644
|
20
|
+
end
|
18
21
|
|
19
|
-
|
20
|
-
|
22
|
+
template "#{daemon[:name]}.daemon.erb", "#{shared_path}/tmp/#{daemon[:name]}.daemon", 0755
|
23
|
+
execute "sudo mv -f #{shared_path}/tmp/#{daemon[:name]}.daemon #{fetch(:daemons_path)}/#{fetch(:application)}-#{daemon[:name]}"
|
21
24
|
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
+
template "#{daemon[:name]}.monit.erb", "#{shared_path}/tmp/#{daemon[:name]}.monit", 0644
|
26
|
+
execute "sudo mv -f #{shared_path}/tmp/#{daemon[:name]}.monit #{fetch(:monit_scripts_path)}/#{fetch(:application)}-#{daemon[:name]}"
|
27
|
+
end
|
25
28
|
|
26
|
-
|
29
|
+
execute "sudo service monit reload"
|
30
|
+
end
|
27
31
|
end
|
28
32
|
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
33
|
+
unless ENV['SKIP_NGINX'] == 'true'
|
34
|
+
if fetch(:setup_nginx, false) == true
|
35
|
+
on roles :web do
|
36
|
+
execute "mkdir -p #{fetch(:deploy_to)}"
|
37
|
+
template "nginx.conf.erb", "#{shared_path}/tmp/nginx.conf", 0644
|
38
|
+
execute "sudo mv -f #{shared_path}/tmp/nginx.conf #{fetch(:nginx_path)}/sites-available/#{fetch(:application)}"
|
39
|
+
execute "sudo ln -snf #{fetch(:nginx_path)}/sites-available/#{fetch(:application)} #{fetch(:nginx_path)}/sites-enabled/#{fetch(:application)}"
|
40
|
+
execute "sudo service nginx reload"
|
41
|
+
end
|
36
42
|
end
|
37
43
|
end
|
38
44
|
end
|
@@ -47,13 +53,13 @@ namespace :deploy do
|
|
47
53
|
end
|
48
54
|
|
49
55
|
if fetch(:setup_daemons, []).any?
|
50
|
-
execute "sudo service monit reload"
|
56
|
+
execute "sudo service monit reload", raise_on_non_zero_exit: false
|
51
57
|
end
|
52
58
|
|
53
59
|
if fetch(:setup_nginx, false) == true
|
54
60
|
execute "sudo rm -f /etc/nginx/sites_available/#{fetch(:application)}"
|
55
61
|
execute "sudo rm -f /etc/nginx/sites_enabled/#{fetch(:application)}"
|
56
|
-
execute "sudo service nginx reload"
|
62
|
+
execute "sudo service nginx reload", raise_on_non_zero_exit: false
|
57
63
|
end
|
58
64
|
|
59
65
|
if fetch(:erase_deploy_folder_on_uninstall, false) == true
|