Skip to content

Remove Heroku-20 support #1591

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 33 commits into from
May 15, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
f145663
Remove heroku-20 version logic
schneems May 1, 2025
b72443d
Update error message
schneems May 1, 2025
141dd15
Remove unsupported Bundler versions
schneems May 1, 2025
b58fcf4
Update download presence logic to remove heroku-20
schneems May 1, 2025
d7f62e7
Remove heroku-18 string from spec
schneems May 1, 2025
ddfd312
Update test to non EOL stack
schneems May 1, 2025
5340d87
Remove (more) deprecated stack references
schneems May 1, 2025
1611c61
Refactor: Move spec file
schneems May 1, 2025
8f871eb
Remove Ruby 1.9 code
schneems May 1, 2025
43d42e7
Remove Ruby <2.1 code
schneems May 1, 2025
bfe9f36
Remove Ruby <2.1 "syck hack" code
schneems May 1, 2025
5effaa1
Remove Ruby < 1.9 logic
schneems May 1, 2025
fcab848
Remove Ruby 1.8.7 code and duplicate env var
schneems May 1, 2025
fe5a7ad
Remove older changelogs (keeping 2024-2025)
schneems May 1, 2025
7d6209f
Remove unused Ruby 2.6 code
schneems May 1, 2025
4572c51
Remove unused constant
schneems May 1, 2025
7d74686
Remove unused logging code
schneems May 1, 2025
5e8d57a
Remove unused methods
schneems May 1, 2025
d0d115a
DRY up logic
schneems May 1, 2025
1c573fb
Remove hardcoded false in vendored_bundle?
schneems May 4, 2025
2f576d4
All bundler versions supported provide multi platform support
schneems May 4, 2025
2614d33
Remove newline
schneems May 4, 2025
48ea9a0
Remove unused method
schneems May 4, 2025
881b56c
Remove legacy cache clear code
schneems May 4, 2025
4536fcf
Fix code alignment
schneems May 4, 2025
4adaa7d
Remove bundler < 2.1 configuration
schneems May 4, 2025
cf2a888
Remove bundler conditional
schneems May 4, 2025
eca1f20
Changelog
schneems May 4, 2025
4379f29
Remove no-op libyaml
schneems May 5, 2025
9c5698a
Remove unused files and Rake code
schneems May 5, 2025
1afa779
Remove purely `true` variable
schneems May 15, 2025
699c88f
Update lib/language_pack/helpers/bundler_wrapper.rb
schneems May 15, 2025
4c74192
Assert no accidental cache purge message
schneems May 15, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

## [Unreleased]

- Removed support for Ubuntu 20.04 (and thus Heroku-20 / `heroku/builder:20`). This includes removing support for Ruby < 3.1 and Bundler < 2.3. (https://github.com/heroku/buildpacks-ruby/pull/1591)

## [v305] - 2025-04-28

Expand Down
71 changes: 0 additions & 71 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,64 +6,8 @@
require "fileutils"
require "tmpdir"
require 'hatchet/tasks'
ENV["BUILDPACK_LOG_FILE"] ||= "tmp/buildpack.log"

require_relative 'lib/rake/deploy_check'

S3_BUCKET_REGION = "us-east-1"
S3_BUCKET_NAME = "heroku-buildpack-ruby"

def s3_tools_dir
File.expand_path("../support/s3", __FILE__)
end

def s3_upload(tmpdir, name)
sh("#{s3_tools_dir}/s3 put #{S3_BUCKET_NAME} #{name}.tgz #{tmpdir}/#{name}.tgz")
end

def vendor_plugin(git_url, branch = nil)
name = File.basename(git_url, File.extname(git_url))
Dir.mktmpdir("#{name}-") do |tmpdir|
FileUtils.rm_rf("#{tmpdir}/*")

Dir.chdir(tmpdir) do
sh "git clone #{git_url} ."
sh "git checkout origin/#{branch}" if branch
FileUtils.rm_rf("#{name}/.git")
sh("tar czvf #{tmpdir}/#{name}.tgz *")
s3_upload(tmpdir, name)
end
end
end

def in_gem_env(gem_home, &block)
old_gem_home = ENV['GEM_HOME']
old_gem_path = ENV['GEM_PATH']
ENV['GEM_HOME'] = ENV['GEM_PATH'] = gem_home.to_s

yield

ENV['GEM_HOME'] = old_gem_home
ENV['GEM_PATH'] = old_gem_path
end

def install_gem(gem_name, version)
name = "#{gem_name}-#{version}"
Dir.mktmpdir("#{gem_name}-#{version}") do |tmpdir|
Dir.chdir(tmpdir) do |dir|
FileUtils.rm_rf("#{tmpdir}/*")

in_gem_env(tmpdir) do
sh("unset RUBYOPT; gem install #{gem_name} --version #{version} --no-ri --no-rdoc --env-shebang")
sh("rm #{gem_name}-#{version}.gem")
sh("rm -rf cache/#{gem_name}-#{version}.gem")
sh("tar czvf #{tmpdir}/#{name}.tgz *")
s3_upload(tmpdir, name)
end
end
end
end

namespace :buildpack do
desc "prepares the next version of the buildpack for release"
task :prepare do
Expand Down Expand Up @@ -91,21 +35,6 @@ namespace :buildpack do
end
end

desc "update plugins"
task "plugins:update" do
vendor_plugin "https://github.com/heroku/rails_log_stdout.git", "legacy"
vendor_plugin "https://github.com/pedro/rails3_serve_static_assets.git"
vendor_plugin "https://github.com/hone/rails31_enable_runtime_asset_compilation.git"
end

desc "install vendored gem"
task "gem:install", :gem, :version do |t, args|
gem = args[:gem]
version = args[:version]

install_gem(gem, version)
end

begin
require 'rspec/core/rake_task'

Expand Down
4 changes: 1 addition & 3 deletions bin/support/ruby_compile
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,7 @@ begin
LanguagePack::ShellHelpers.initialize_env(ARGV[2])
if pack = LanguagePack.detect(ARGV[0], ARGV[1])
pack.topic("Compiling #{pack.name}")
pack.log("compile") do
pack.compile
end
pack.compile
end
rescue Exception => e
LanguagePack::ShellHelpers.display_error_and_exit(e)
Expand Down
4 changes: 1 addition & 3 deletions bin/support/ruby_test-compile
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,7 @@ begin
if pack = LanguagePack.detect(ARGV[0], ARGV[1])
LanguagePack::ShellHelpers.initialize_env(ARGV[2])
pack.topic("Setting up Test for #{pack.name}")
pack.log("test_compile") do
pack.compile
end
pack.compile
end
rescue Exception => e
LanguagePack::ShellHelpers.display_error_and_exit(e)
Expand Down
1 change: 0 additions & 1 deletion changelogs/v205/.gitkeep

This file was deleted.

3 changes: 0 additions & 3 deletions changelogs/v205/bundler.md

This file was deleted.

32 changes: 0 additions & 32 deletions changelogs/v205/malloc.md

This file was deleted.

Empty file removed changelogs/v206/.gitkeep
Empty file.
3 changes: 0 additions & 3 deletions changelogs/v206/default_ruby.md

This file was deleted.

9 changes: 0 additions & 9 deletions changelogs/v206/ruby_warning.md

This file was deleted.

Empty file removed changelogs/v207/.gitkeep
Empty file.
11 changes: 0 additions & 11 deletions changelogs/v207/remove_bundle_with.md

This file was deleted.

15 changes: 0 additions & 15 deletions changelogs/v207/vendor_libpq.md

This file was deleted.

3 changes: 0 additions & 3 deletions changelogs/v208/default_ruby_2_6_5.md

This file was deleted.

3 changes: 0 additions & 3 deletions changelogs/v214/default_ruby_266.md

This file was deleted.

11 changes: 0 additions & 11 deletions changelogs/v218/disable_spring.md

This file was deleted.

8 changes: 0 additions & 8 deletions changelogs/v218/node_yarn.md

This file was deleted.

3 changes: 0 additions & 3 deletions changelogs/v219/bundler-214.md

This file was deleted.

20 changes: 0 additions & 20 deletions changelogs/v219/bundler-env-vars.md

This file was deleted.

Empty file removed changelogs/v224/.gitkeep
Empty file.
13 changes: 0 additions & 13 deletions changelogs/v224/jvm_installer_default.md

This file was deleted.

3 changes: 0 additions & 3 deletions changelogs/v225/bundler_2_2_11.md

This file was deleted.

3 changes: 0 additions & 3 deletions changelogs/v226/bundler_2_2_15.md

This file was deleted.

3 changes: 0 additions & 3 deletions changelogs/v227/bundler_2216.md

This file was deleted.

3 changes: 0 additions & 3 deletions changelogs/v228/bundler_2_2_21.md

This file was deleted.

7 changes: 0 additions & 7 deletions changelogs/v229/WEB_CONCURRENCY.md

This file was deleted.

3 changes: 0 additions & 3 deletions changelogs/v230/ruby_274_default.md

This file was deleted.

Empty file removed changelogs/v231/.gitkeep
Empty file.
10 changes: 0 additions & 10 deletions changelogs/v231/jsbundling_packagejson.md

This file was deleted.

10 changes: 0 additions & 10 deletions changelogs/v231/jsbundling_yarnlock.md

This file was deleted.

Empty file removed changelogs/v233/.gitkeep
Empty file.
8 changes: 0 additions & 8 deletions changelogs/v233/node_yarn.md

This file was deleted.

3 changes: 0 additions & 3 deletions changelogs/v233/ruby_275_default.md

This file was deleted.

3 changes: 0 additions & 3 deletions changelogs/v235/bundler_2_2_33.md

This file was deleted.

3 changes: 0 additions & 3 deletions changelogs/v237/ruby_303_default.md

This file was deleted.

3 changes: 0 additions & 3 deletions changelogs/v238/bundle-upgrade.md

This file was deleted.

3 changes: 0 additions & 3 deletions changelogs/v240/bundler_2_3_10.md

This file was deleted.

3 changes: 0 additions & 3 deletions changelogs/v244/default_ruby.md

This file was deleted.

3 changes: 0 additions & 3 deletions changelogs/v245/bundler_2_3_25.md

This file was deleted.

Loading