Skip to content

Commit ae89352

Browse files
ipmbclaude
andcommitted
Remove dead code for EOL stacks (heroku-18, heroku-20)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 9673df5 commit ae89352

File tree

2 files changed

+0
-45
lines changed

2 files changed

+0
-45
lines changed

builder/build/appjson.go

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -32,27 +32,6 @@ const DefaultStack = "heroku-22"
3232

3333
// buildpacks included in builder
3434
var IncludedBuildpacks = map[string][]string{
35-
"heroku-20": {
36-
// $ pack builder inspect heroku/buildpacks:20 -o json | jq '.remote_info.buildpacks[].id'
37-
"heroku/builder-eol-warning",
38-
"heroku/go",
39-
"heroku/gradle",
40-
"heroku/java",
41-
"heroku/jvm",
42-
"heroku/maven",
43-
"heroku/nodejs",
44-
"heroku/nodejs-corepack",
45-
"heroku/nodejs-engine",
46-
"heroku/nodejs-npm-engine",
47-
"heroku/nodejs-npm-install",
48-
"heroku/nodejs-pnpm-install",
49-
"heroku/nodejs-yarn",
50-
"heroku/php",
51-
"heroku/procfile",
52-
"heroku/python",
53-
"heroku/ruby",
54-
"heroku/scala",
55-
},
5635
"heroku-22": {
5736
// $ pack builder inspect heroku/builder:22 -o json | jq '.remote_info.buildpacks[].id'
5837
"heroku/deb-packages",
@@ -143,12 +122,6 @@ func ParseAppJson(ctx context.Context) (*AppJSON, error) {
143122
// the first item in the list is the builder, followed by the stack image
144123
// the stack image is only used for prefetching, so non-heroku stacks should still work
145124
func (a *AppJSON) GetBuilders() []string {
146-
if a.Stack == "heroku-18" {
147-
return []string{"heroku/buildpacks:18", "heroku/heroku:18-cnb"}
148-
}
149-
if a.Stack == "heroku-20" {
150-
return []string{"heroku/buildpacks:20", "heroku/heroku:20-cnb"}
151-
}
152125
if a.Stack == "heroku-22" {
153126
return []string{"heroku/builder:22", "heroku/heroku:22-cnb"}
154127
}

builder/build/appjson_test.go

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import (
88
"testing"
99

1010
"github.com/rs/zerolog"
11-
"github.com/rs/zerolog/log"
1211
)
1312

1413
func stringSliceEqual(a, b []string) bool {
@@ -25,21 +24,6 @@ func stringSliceEqual(a, b []string) bool {
2524

2625
var testContext = zerolog.New(os.Stdout).With().Timestamp().Logger().WithContext(context.Background())
2726

28-
func TestAppJsonBuildpackPatch(t *testing.T) {
29-
a := AppJSON{
30-
Buildpacks: []Buildpack{
31-
{URL: "heroku/nodejs"},
32-
{URL: "heroku/python"},
33-
},
34-
Stack: "heroku-20",
35-
ctx: log.With().Logger().WithContext(context.Background()),
36-
}
37-
expected := []string{"urn:cnb:builder:heroku/nodejs", "urn:cnb:builder:heroku/python"}
38-
if !stringSliceEqual(a.GetBuildpacks(), expected) {
39-
t.Errorf("expected %s, got %s", expected, a.GetBuildpacks())
40-
}
41-
}
42-
4327
func TestAppJsonMissing(t *testing.T) {
4428
a := AppJSON{
4529
reader: func() ([]byte, error) {
@@ -77,8 +61,6 @@ func TestAppJsonBuilders(t *testing.T) {
7761
stack string
7862
expected []string
7963
}{
80-
{"heroku-18", []string{"heroku/buildpacks:18", "heroku/heroku:18-cnb"}},
81-
{"heroku-20", []string{"heroku/buildpacks:20", "heroku/heroku:20-cnb"}},
8264
{"heroku-22", []string{"heroku/builder:22", "heroku/heroku:22-cnb"}},
8365
{"custom/builder:latest", []string{"custom/builder:latest"}},
8466
}

0 commit comments

Comments
 (0)