Skip to content

Commit

Permalink
Merge pull request heroku#24 from qnyp/reenable-bower-caching
Browse files Browse the repository at this point in the history
Re-enabled caching bower packages and registry
  • Loading branch information
juno committed Apr 7, 2014
2 parents 3b2c4f6 + 776f7e8 commit cdd0ee3
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions lib/language_pack/ruby.rb
Expand Up @@ -610,8 +610,15 @@ def build_bower
log("bower") do
topic("Installing JavaScript dependencies using Bower #{bower_version}")

pipe("./node_modules/bower/bin/bower install --production")
unless $?.success?
load_bower_cache

pipe("./node_modules/bower/bin/bower install --config.storage.packages=vendor/bower/packages --config.storage.registry=vendor/bower/registry --config.tmp=vendor/bower/tmp 2>&1")
if $?.success?
log "bower", :status => "success"
puts "Cleaning up the bower tmp."
FileUtils.rm_rf("vendor/bower/tmp")
cache.store "vendor/bower"
else
error error_message
end
end
Expand Down

0 comments on commit cdd0ee3

Please sign in to comment.