capistrano-node-deploy 1.0.5 → 1.0.6
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/VERSION +1 -1
- data/capistrano-node-deploy.gemspec +1 -1
- data/lib/capistrano/node-deploy.rb +11 -9
- metadata +3 -3
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.0.
|
1
|
+
1.0.6
|
@@ -23,7 +23,7 @@ end
|
|
23
23
|
|
24
24
|
Capistrano::Configuration.instance(:must_exist).load do |configuration|
|
25
25
|
before "deploy", "deploy:create_release_dir"
|
26
|
-
before "deploy", "node:
|
26
|
+
before "deploy", "node:check_upstart_config"
|
27
27
|
after "deploy:symlink", "node:install_packages"
|
28
28
|
after "deploy:symlink", "node:restart"
|
29
29
|
|
@@ -42,19 +42,21 @@ Capistrano::Configuration.instance(:must_exist).load do |configuration|
|
|
42
42
|
run "ln -s #{shared_path}/node_modules #{current_path}/node_modules"
|
43
43
|
end
|
44
44
|
|
45
|
+
task :check_upstart_config do
|
46
|
+
create_upstart_config unless remote_file_exists?("/etc/init/#{application}.conf")
|
47
|
+
end
|
48
|
+
|
45
49
|
desc "Create upstart script for this node app"
|
46
50
|
task :create_upstart_config do
|
47
51
|
config_file_path = "/etc/init/#{application}.conf"
|
48
|
-
|
49
|
-
temp_config_file_path = "#{shared_path}/#{application}.conf"
|
52
|
+
temp_config_file_path = "#{shared_path}/#{application}.conf"
|
50
53
|
|
51
|
-
|
52
|
-
|
54
|
+
# Generate and upload the upstart script
|
55
|
+
put UPSTART_TEMPLATE.gsub(/\{\{(.*?)\}\}/) { eval($1) }, temp_config_file_path
|
53
56
|
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
end
|
57
|
+
# Copy the script into place and make executable
|
58
|
+
sudo "cp #{temp_config_file_path} #{config_file_path}"
|
59
|
+
sudo "chmod +x #{config_file_path}"
|
58
60
|
end
|
59
61
|
|
60
62
|
desc "Start the node application"
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: capistrano-node-deploy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 27
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 1.0.
|
9
|
+
- 6
|
10
|
+
version: 1.0.6
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- James Smith
|