Sha256: d1ef6ea8b3ecccc5e8f8a1f926dfbf50f4a5968447f885343aaef14f75a12a76

Contents?: true

Size: 680 Bytes

Versions: 1

Compression:

Stored size: 680 Bytes

Contents

Capistrano::Configuration.instance.load do
  # http://www.bencurtis.com/2011/12/skipping-asset-compilation-with-capistrano/
  namespace :deploy do
    namespace :assets do
      task :precompile, :roles => :web, :except => { :no_release => true } do
        from = source.next_revision(current_revision)
        if capture("cd #{latest_release} && #{source.local.log(from)} lib/assets/ vendor/assets/ app/assets/ | wc -l").to_i > 0
          run %Q{cd #{latest_release} && #{rake} RAILS_ENV=#{rails_env} #{asset_env} assets:precompile}
        else
          logger.info "Skipping asset pre-compilation because there were no asset changes"
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
ms_deploy-0.0.11 lib/ms_deploy/recipes/deploy/assets.rb