diff --git a/CHANGELOG.md b/CHANGELOG.md index f3f33b1..56661fe 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ # [master][] * Your contribution here! +* rails_assets_groups config option to set RAILS_GROUPS (https://github.com/capistrano/rails/pull/135) # [1.2.3][] (Mar 4 2017) diff --git a/README.md b/README.md index 4cd0463..1c20585 100644 --- a/README.md +++ b/README.md @@ -71,6 +71,9 @@ set :assets_roles, [:web, :app] # This should match config.assets.prefix in your rails config/application.rb set :assets_prefix, 'prepackaged-assets' +# RAILS_GROUPS env value for the assets:precompile task. Default to nil. +set :rails_assets_groups, :assets + # If you need to touch public/images, public/javascripts, and public/stylesheets on each deploy set :normalize_asset_timestamps, %w{public/images public/javascripts public/stylesheets} diff --git a/lib/capistrano/tasks/assets.rake b/lib/capistrano/tasks/assets.rake index b882be6..94b0949 100644 --- a/lib/capistrano/tasks/assets.rake +++ b/lib/capistrano/tasks/assets.rake @@ -65,7 +65,7 @@ namespace :deploy do task :precompile do on release_roles(fetch(:assets_roles)) do within release_path do - with rails_env: fetch(:rails_env) do + with rails_env: fetch(:rails_env), rails_groups: fetch(:rails_assets_groups) do execute :rake, "assets:precompile" end end