Last active
December 1, 2024 08:06
-
-
Save andrey-skat/10399224 to your computer and use it in GitHub Desktop.
Revisions
-
andrey-skat revised this gist
Apr 11, 2014 . 1 changed file with 2 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -17,7 +17,8 @@ within release_path do with rails_env: fetch(:rails_env) do old_manifest_path = "#{shared_path}/public/assets/manifest*" execute :rm, old_manifest_path if test "[ -f #{old_manifest_path} ]" upload!('./public/assets/', "#{shared_path}/public/", recursive: true) end end -
andrey-skat revised this gist
Apr 11, 2014 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -17,6 +17,7 @@ within release_path do with rails_env: fetch(:rails_env) do execute :rm, "#{shared_path}/public/assets/manifest*" upload!('./public/assets/', "#{shared_path}/public/", recursive: true) end end -
andrey-skat revised this gist
Apr 10, 2014 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,4 @@ # also you need to uncomment next line in Capfile # require 'capistrano/rails/assets' namespace :deploy do -
andrey-skat revised this gist
Apr 10, 2014 . 1 changed file with 3 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,3 +1,6 @@ # also you need uncomment next line in Capfile # require 'capistrano/rails/assets' namespace :deploy do namespace :assets do -
andrey-skat created this gist
Apr 10, 2014 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,26 @@ namespace :deploy do namespace :assets do Rake::Task['deploy:assets:precompile'].clear_actions desc 'Precompile assets locally and upload to servers' task :precompile do on roles(fetch(:assets_roles)) do run_locally do with rails_env: fetch(:rails_env) do execute 'bin/rake assets:precompile' end end within release_path do with rails_env: fetch(:rails_env) do upload!('./public/assets/', "#{shared_path}/public/", recursive: true) end end run_locally { execute 'rm -rf public/assets' } end end end end