Skip to content

Commit

Permalink
store the buildpack version in the cache
Browse files Browse the repository at this point in the history
  • Loading branch information
hone committed Oct 14, 2012
1 parent f3fdea4 commit eba682b
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions lib/language_pack/ruby.rb
Expand Up @@ -5,6 +5,7 @@

# base Ruby Language Pack. This is for any base ruby app.
class LanguagePack::Ruby < LanguagePack::Base
BUILDPACK_VERSION = "v40"
LIBYAML_VERSION = "0.1.4"
LIBYAML_PATH = "libyaml-#{LIBYAML_VERSION}"
BUNDLER_VERSION = "1.2.1"
Expand Down Expand Up @@ -577,10 +578,11 @@ def run_assets_precompile_rake_task
def load_bundler_cache
cache_load "vendor"

full_ruby_version = run(%q(ruby -v)).chomp
heroku_metadata = "vendor/heroku"
ruby_version_cache = "#{heroku_metadata}/ruby_version"
bundler_cache = "vendor/bundle"
full_ruby_version = run(%q(ruby -v)).chomp
heroku_metadata = "vendor/heroku"
ruby_version_cache = "#{heroku_metadata}/ruby_version"
buildpack_version_cache = "vendor/heroku/buildpack_version"
bundler_cache = "vendor/bundle"

# fix bug from v37 deploy
if File.exists?("vendor/ruby_version")
Expand All @@ -604,6 +606,9 @@ def load_bundler_cache
File.open(ruby_version_cache, 'w') do |file|
file.puts full_ruby_version
end
File.open(buildpack_version_cache, 'w') do |file|
file.puts BUILDPACK_VERSION
end
cache_store heroku_metadata
end
end

0 comments on commit eba682b

Please sign in to comment.