Add Capistrano task to create i18n JS files
This commit is contained in:
parent
28cc6b5938
commit
dcca449de1
|
@ -35,10 +35,16 @@ append :linked_dirs, "log", "tmp/pids", "tmp/cache", "tmp/sockets", "public/uplo
|
||||||
# Ruby version / RVM
|
# Ruby version / RVM
|
||||||
set :rvm1_ruby_version, '2.3.3@retrospring'
|
set :rvm1_ruby_version, '2.3.3@retrospring'
|
||||||
|
|
||||||
|
require 'pry'
|
||||||
|
binding.pry
|
||||||
|
|
||||||
# Rollbar
|
# Rollbar
|
||||||
set :rollbar_token, '35f65946f562414da66d0d48073f5290' # TODO: before publishing this repo (again) remove this token
|
set :rollbar_token, '35f65946f562414da66d0d48073f5290' # TODO: before publishing this repo (again) remove this token
|
||||||
set :rollbar_env, Proc.new { fetch :stage }
|
set :rollbar_env, Proc.new { fetch :stage }
|
||||||
set :rollbar_role, Proc.new { :app }
|
set :rollbar_role, Proc.new { :app }
|
||||||
|
|
||||||
|
# Create JS i18n files after precompiling assets
|
||||||
|
after 'assets:precompile', 'i18n:js_assets'
|
||||||
|
|
||||||
# Restart the app server after successful deploy
|
# Restart the app server after successful deploy
|
||||||
after 'deploy:cleanup', 'deploy:restart'
|
after 'deploy:cleanup', 'deploy:restart'
|
||||||
|
|
|
@ -0,0 +1,9 @@
|
||||||
|
namespace :i18n do
|
||||||
|
task :js_assets do
|
||||||
|
within release_path do
|
||||||
|
with rails_env: fetch(:rails_env), rails_groups: fetch(:rails_assets_groups) do
|
||||||
|
execute :rake, "i18n:js:export"
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
Loading…
Reference in New Issue