Skip to content

Commit

Permalink
Merge pull request #1329 from mboldt/fix-buildpack-api
Browse files Browse the repository at this point in the history
Fix default buildpack API version.
  • Loading branch information
jromero authored Nov 18, 2021
2 parents 16ff4bc + 801590b commit fe92411
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions internal/commands/buildpack_new.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import (

"github.com/spf13/cobra"

"github.com/buildpacks/pack/internal/build"
"github.com/buildpacks/pack/internal/style"
"github.com/buildpacks/pack/pkg/client"
"github.com/buildpacks/pack/pkg/dist"
Expand Down Expand Up @@ -82,7 +81,7 @@ func BuildpackNew(logger logging.Logger, creator BuildpackCreator) *cobra.Comman
}),
}

cmd.Flags().StringVarP(&flags.API, "api", "a", build.SupportedPlatformAPIVersions.Latest().String(), "Buildpack API compatibility of the generated buildpack")
cmd.Flags().StringVarP(&flags.API, "api", "a", "0.5", "Buildpack API compatibility of the generated buildpack")
cmd.Flags().StringVarP(&flags.Path, "path", "p", "", "Path to generate the buildpack")
cmd.Flags().StringVarP(&flags.Version, "version", "V", "1.0.0", "Version of the generated buildpack")
cmd.Flags().StringSliceVarP(&flags.Stacks, "stacks", "s", []string{"io.buildpacks.stacks.bionic"}, "Stack(s) this buildpack will be compatible with"+multiValueHelp("stack"))
Expand Down
2 changes: 1 addition & 1 deletion internal/commands/buildpack_new_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ func testBuildpackNewCommand(t *testing.T, when spec.G, it spec.S) {
when("BuildpackNew#Execute", func() {
it("uses the args to generate artifacts", func() {
mockClient.EXPECT().NewBuildpack(gomock.Any(), client.NewBuildpackOptions{
API: "0.6",
API: "0.5",
ID: "example/some-cnb",
Path: filepath.Join(tmpDir, "some-cnb"),
Version: "1.0.0",
Expand Down

0 comments on commit fe92411

Please sign in to comment.