1
0
Fork 0

git-up: recompile assets

This commit is contained in:
Gregory Eremin 2014-06-02 19:28:30 +07:00
parent f15d018f72
commit 5c1287b307
No known key found for this signature in database
GPG Key ID: 5EFA427EEC26E86C
1 changed files with 6 additions and 1 deletions

View File

@ -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