git-up: recompile assets
This commit is contained in:
		
							parent
							
								
									f15d018f72
								
							
						
					
					
						commit
						5c1287b307
					
				@ -38,10 +38,15 @@ end
 | 
			
		||||
exit if conflict
 | 
			
		||||
 | 
			
		||||
# Running bundle command if needed
 | 
			
		||||
system 'bundle' if files.keys.include?('Gemfile')
 | 
			
		||||
system 'bundle' if files.keys.include?('Gemfile.lock')
 | 
			
		||||
 | 
			
		||||
# Migrating if schema has changed
 | 
			
		||||
if files.keys.include?('db/schema.rb')
 | 
			
		||||
  system 'bundle exec rake db:migrate'
 | 
			
		||||
  system 'git checkout db/schema.rb' # Reseting schema
 | 
			
		||||
end
 | 
			
		||||
 | 
			
		||||
if files.keys.grep(/^app\/assets/).length > 0
 | 
			
		||||
  puts 'Compiling assets...'
 | 
			
		||||
  system 'bundle exec rake assets:precompile > /dev/null 2>&1'
 | 
			
		||||
end
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user