Skip to content

Commit fe92411

Browse files
authored
Merge pull request #1329 from mboldt/fix-buildpack-api
Fix default buildpack API version.
2 parents 16ff4bc + 801590b commit fe92411

2 files changed

Lines changed: 2 additions & 3 deletions

File tree

internal/commands/buildpack_new.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import (
99

1010
"github.com/spf13/cobra"
1111

12-
"github.com/buildpacks/pack/internal/build"
1312
"github.com/buildpacks/pack/internal/style"
1413
"github.com/buildpacks/pack/pkg/client"
1514
"github.com/buildpacks/pack/pkg/dist"
@@ -82,7 +81,7 @@ func BuildpackNew(logger logging.Logger, creator BuildpackCreator) *cobra.Comman
8281
}),
8382
}
8483

85-
cmd.Flags().StringVarP(&flags.API, "api", "a", build.SupportedPlatformAPIVersions.Latest().String(), "Buildpack API compatibility of the generated buildpack")
84+
cmd.Flags().StringVarP(&flags.API, "api", "a", "0.5", "Buildpack API compatibility of the generated buildpack")
8685
cmd.Flags().StringVarP(&flags.Path, "path", "p", "", "Path to generate the buildpack")
8786
cmd.Flags().StringVarP(&flags.Version, "version", "V", "1.0.0", "Version of the generated buildpack")
8887
cmd.Flags().StringSliceVarP(&flags.Stacks, "stacks", "s", []string{"io.buildpacks.stacks.bionic"}, "Stack(s) this buildpack will be compatible with"+multiValueHelp("stack"))

internal/commands/buildpack_new_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ func testBuildpackNewCommand(t *testing.T, when spec.G, it spec.S) {
5757
when("BuildpackNew#Execute", func() {
5858
it("uses the args to generate artifacts", func() {
5959
mockClient.EXPECT().NewBuildpack(gomock.Any(), client.NewBuildpackOptions{
60-
API: "0.6",
60+
API: "0.5",
6161
ID: "example/some-cnb",
6262
Path: filepath.Join(tmpDir, "some-cnb"),
6363
Version: "1.0.0",

0 commit comments

Comments
 (0)