deployinator 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/deployinator/deploy.rb +17 -1
- metadata +1 -1
data/lib/deployinator/deploy.rb
CHANGED
@@ -29,6 +29,22 @@ namespace :deploy do
|
|
29
29
|
# Append dependancy to existing cleanup task
|
30
30
|
task :cleanup => :set_rm_command_map
|
31
31
|
|
32
|
+
if Rake::Task.task_defined?("bundler:install")
|
33
|
+
#desc 'Copies .git folder'
|
34
|
+
task :copy_git do
|
35
|
+
unless ENV['from_local'] == "true"
|
36
|
+
on roles(:app) do
|
37
|
+
as :root do
|
38
|
+
within release_path do
|
39
|
+
execute :cp, '-r', repo_path, '.git'
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
45
|
+
before 'bundler:install', 'deploy:copy_git'
|
46
|
+
end
|
47
|
+
|
32
48
|
# If defined, overwrite :assets:precompile to use docker
|
33
49
|
if Rake::Task.task_defined?("deploy:assets:precompile")
|
34
50
|
Rake::Task["deploy:assets:precompile"].clear
|
@@ -254,7 +270,7 @@ namespace :deploy do
|
|
254
270
|
else
|
255
271
|
as :root do
|
256
272
|
execute("rm", "-f", "#{fetch(:external_socket_path)}/unicorn.pid")
|
257
|
-
|
273
|
+
execute "chown", "-R", "#{fetch(:deployer_user_id)}:#{fetch(:deployer_user_id)}", "#{fetch(:deploy_to)}/shared/bundle"
|
258
274
|
end
|
259
275
|
execute("docker", "run", fetch(:docker_run_bluepill_command))
|
260
276
|
end
|