Created
          July 3, 2013 14:33 
        
      - 
      
- 
        Save jackboberg/5918466 to your computer and use it in GitHub Desktop. 
    Precompile assets locally and rsync
  
        
  
    
      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 characters
    
  
  
    
  | namespace :deploy do | |
| namespace :assets do | |
| desc 'Run the precompile task locally and rsync with shared' | |
| task :precompile, :roles => :web, :except => { :no_release => true } do | |
| system "RAILS_ENV=development bundle exec rake assets:precompile" | |
| system "rsync --recursive --times --rsh=ssh --compress --human-readable --progress public/assets #{user}@#{host}:#{shared_path}" | |
| system "RAILS_ENV=development bundle exec rake assets:clean" | |
| end | |
| task :update_asset_mtimes do | |
| puts 'skipping update_asset_mtimes' | |
| end | |
| end | |
| end | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment