From 25dc415b131ef7d6ebe578253da7aa4630947c9c Mon Sep 17 00:00:00 2001 From: Vladimir Elchinov Date: Wed, 23 Dec 2015 16:35:46 +0300 Subject: [PATCH 1/2] Allow to skip copying of assets --- lib/capistrano/tasks/faster_assets.rake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/capistrano/tasks/faster_assets.rake b/lib/capistrano/tasks/faster_assets.rake index 30e3f8f..61d6106 100644 --- a/lib/capistrano/tasks/faster_assets.rake +++ b/lib/capistrano/tasks/faster_assets.rake @@ -42,7 +42,7 @@ namespace :deploy do info("Skipping asset precompile, no asset diff found") # copy over all of the assets from the last release - execute(:cp, '-r', latest_release_path.join('public', fetch(:assets_prefix)), release_path.join('public', fetch(:assets_prefix))) + unless fetch(:faster_assets_skip_cp) execute(:cp, '-r', latest_release_path.join('public', fetch(:assets_prefix)), release_path.join('public', fetch(:assets_prefix))) rescue PrecompileRequired execute(:rake, "assets:precompile") end From 961811977a909adb6af8346a6026e8b0d3e16002 Mon Sep 17 00:00:00 2001 From: Vladimir Elchinov Date: Wed, 23 Dec 2015 16:47:45 +0300 Subject: [PATCH 2/2] fix --- lib/capistrano/tasks/faster_assets.rake | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/capistrano/tasks/faster_assets.rake b/lib/capistrano/tasks/faster_assets.rake index 61d6106..27962fe 100644 --- a/lib/capistrano/tasks/faster_assets.rake +++ b/lib/capistrano/tasks/faster_assets.rake @@ -42,7 +42,9 @@ namespace :deploy do info("Skipping asset precompile, no asset diff found") # copy over all of the assets from the last release - unless fetch(:faster_assets_skip_cp) execute(:cp, '-r', latest_release_path.join('public', fetch(:assets_prefix)), release_path.join('public', fetch(:assets_prefix))) + unless fetch(:faster_assets_skip_cp) + execute(:cp, '-r', latest_release_path.join('public', fetch(:assets_prefix)), release_path.join('public', fetch(:assets_prefix))) + end rescue PrecompileRequired execute(:rake, "assets:precompile") end