diff --git a/CHANGELOG.md b/CHANGELOG.md index 9fc62da18..7ed5d5d07 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,24 @@ ## [Unreleased] +## [v306] - 2025-05-08 + +- JRuby 9.4.12.0, 9.4.12.1, 10.0.0.0, and 10.0.0.1 is now available + + +## [v305] - 2025-04-28 + +- Fix `cp --update=none` warning `heroku-22` (https://github.com/heroku/heroku-buildpack-ruby/pull/1588) + +## [v304] - 2025-04-28 + +- Fix `cp --update=none` on `heroku-20` (https://github.com/heroku/heroku-buildpack-ruby/pull/1586) + +## [v303] - 2025-04-25 + +- Ruby 3.5.0-preview1 is now available +- Fix warning message about `cp -n` (https://github.com/heroku/heroku-buildpack-ruby/pull/1583) + ## [v302] - 2025-04-16 - Ruby 3.3.8 is now available @@ -1675,7 +1693,11 @@ Bugfixes: * Change gem detection to use lockfile parser * use `$RACK_ENV` when thin is detected for rack apps -[unreleased]: https://github.com/heroku/heroku-buildpack-ruby/compare/v302...main +[unreleased]: https://github.com/heroku/heroku-buildpack-ruby/compare/v306...main +[v306]: https://github.com/heroku/heroku-buildpack-ruby/compare/v305...v306 +[v305]: https://github.com/heroku/heroku-buildpack-ruby/compare/v304...v305 +[v304]: https://github.com/heroku/heroku-buildpack-ruby/compare/v303...v304 +[v303]: https://github.com/heroku/heroku-buildpack-ruby/compare/v302...v303 [v302]: https://github.com/heroku/heroku-buildpack-ruby/compare/v301...v302 [v301]: https://github.com/heroku/heroku-buildpack-ruby/compare/v300...v301 [v300]: https://github.com/heroku/heroku-buildpack-ruby/compare/v299...v300 diff --git a/lib/language_pack/cache.rb b/lib/language_pack/cache.rb index 6fa8bc58b..a1aec94d2 100644 --- a/lib/language_pack/cache.rb +++ b/lib/language_pack/cache.rb @@ -58,7 +58,13 @@ def load_without_overwrite(path, dest=nil) return unless @cache_base dest ||= path - copy (@cache_base + path), dest, '-a -n' + + case ENV["STACK"] + when "heroku-20", "heroku-22", "scalingo-20", "scalingo-22" + copy (@cache_base + path), dest, "-a -n" + else + copy (@cache_base + path), dest, "-a --update=none" + end end # copy cache contents @@ -70,7 +76,9 @@ def copy(from, to, options='-a') return false unless File.exist?(from) return true if File.expand_path(from) == File.expand_path(to) # see story 80029582 FileUtils.mkdir_p File.dirname(to) - system("cp #{options} #{from}/. #{to}") + command = "cp #{options} #{from}/. #{to}" + system(command) + raise "Command failed `#{command}`" unless $? end # copy contents between to places in the cache diff --git a/lib/language_pack/version.rb b/lib/language_pack/version.rb index 3a72e8cf3..0a4a4fc47 100644 --- a/lib/language_pack/version.rb +++ b/lib/language_pack/version.rb @@ -2,6 +2,6 @@ module LanguagePack class LanguagePack::Base - BUILDPACK_VERSION = "v302" + BUILDPACK_VERSION = "v306" end end