Skip to content

Commit

Permalink
Merge pull request #135 from printercu/patch-1
Browse files Browse the repository at this point in the history
Allow to set RAILS_GROUPS for assets:precompile
  • Loading branch information
mattbrictson authored Mar 4, 2017
2 parents 6bcad38 + bfe1e93 commit f4befc4
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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)

Expand Down
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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}

Expand Down
2 changes: 1 addition & 1 deletion lib/capistrano/tasks/assets.rake
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit f4befc4

Please sign in to comment.