From 3f39b5c5cf60374a71d904492bf3195eaa1c9551 Mon Sep 17 00:00:00 2001 From: "juliendd@troopers.email" Date: Wed, 4 Apr 2018 14:13:53 +0200 Subject: [PATCH 1/2] fos_js_routes is no longer suffixed in prod environment the existing suffix is kept but deprecated --- lib/capistrano/tasks/assets.rake | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/capistrano/tasks/assets.rake b/lib/capistrano/tasks/assets.rake index b4897b4..8e45129 100644 --- a/lib/capistrano/tasks/assets.rake +++ b/lib/capistrano/tasks/assets.rake @@ -33,7 +33,8 @@ namespace :fos do DESC task :dump do on roles(:app) do - execute "cd #{release_path} && php " + fetch(:symfony_console_path) + " --env=prod fos:js-routing:dump --target=web/js/fos_js_routes_prod.js" + execute "cd #{release_path} && php " + fetch(:symfony_console_path) + " --env=prod fos:js-routing:dump --target=web/js/fos_js_routes.js" + execute "cp web/js/fos_js_routes.js web/js/fos_js_routes_prod.js" end end end From a25f5338665fc418117aca689f21b1a1962ed6e5 Mon Sep 17 00:00:00 2001 From: Julien Dubuisson Duplessis Date: Tue, 22 May 2018 10:05:49 +0200 Subject: [PATCH 2/2] script strengthening : working directory --- lib/capistrano/tasks/assets.rake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/capistrano/tasks/assets.rake b/lib/capistrano/tasks/assets.rake index 8e45129..92c74c8 100644 --- a/lib/capistrano/tasks/assets.rake +++ b/lib/capistrano/tasks/assets.rake @@ -34,8 +34,8 @@ namespace :fos do task :dump do on roles(:app) do execute "cd #{release_path} && php " + fetch(:symfony_console_path) + " --env=prod fos:js-routing:dump --target=web/js/fos_js_routes.js" - execute "cp web/js/fos_js_routes.js web/js/fos_js_routes_prod.js" + execute "cd #{release_path} && cp web/js/fos_js_routes.js web/js/fos_js_routes_prod.js" end end end -end \ No newline at end of file +end