lib/capistrano/node-deploy.rb in capistrano-node-deploy-1.2.4 vs lib/capistrano/node-deploy.rb in capistrano-node-deploy-1.2.5
- old
+ new
@@ -14,10 +14,11 @@
exists = remote_file_exists?(full_path)
!exists || exists && !remote_file_content_same_as?(full_path, content)
end
Capistrano::Configuration.instance(:must_exist).load do |configuration|
+ default_run_options[:pty] = true
before "deploy", "deploy:create_release_dir"
before "deploy", "node:check_upstart_config"
after "deploy:update", "node:install_packages", "node:restart"
after "deploy:rollback", "node:restart"
@@ -56,10 +57,10 @@
desc "Check required packages and install if packages are not installed"
task :install_packages do
run "mkdir -p #{shared_path}/node_modules"
run "cp #{release_path}/package.json #{shared_path}"
run "cp #{release_path}/npm-shrinkwrap.json #{shared_path}"
- run "cd #{shared_path} && npm install #{(node_env == 'production') ? '--production' : ''} --loglevel warn"
+ run "cd #{shared_path} && npm install #{(node_env != 'production') ? '--dev' : ''} --loglevel warn"
run "ln -s #{shared_path}/node_modules #{release_path}/node_modules"
end
task :check_upstart_config do
create_upstart_config if remote_file_differs?(upstart_file_path, upstart_file_contents)