Skip to content

Instantly share code, notes, and snippets.

@wearethefoos
Created February 5, 2014 14:56
Show Gist options
  • Save wearethefoos/8825398 to your computer and use it in GitHub Desktop.
Save wearethefoos/8825398 to your computer and use it in GitHub Desktop.
def assets_same_since?(old_assets_version = nil)
return false if old_assets_version.nil? || old_assets_version.empty?
return false if ENV['FORCE_ASSETS_COMPILATION']
changed = %x(git diff #{old_assets_version}.. \
vendor/assets/ \
app/assets/ \
config/javascript_translations.yml \
config/javascript.yml | wc -l).chomp
changed.to_i == 0
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment