Skip to content

Commit

Permalink
Remove commands that were moved to libpak-tools & move carton package…
Browse files Browse the repository at this point in the history
… into libpak-tools

The rest of this is moving the internal packages that were all used by libpak before to now be external packages so that they're accessible by libpak-tools. This is a trade-off that we'll need to make in order to split these up, but I think it's OK. Some of these can be useful outside of libpak.

Signed-off-by: Daniel Mikusa <[email protected]>
  • Loading branch information
dmikusa committed Oct 29, 2024
1 parent 5ee55e1 commit 578a465
Show file tree
Hide file tree
Showing 47 changed files with 88 additions and 3,049 deletions.
8 changes: 4 additions & 4 deletions build.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,17 @@ package libpak
import (
"github.com/buildpacks/libcnb/v2"

"github.com/paketo-buildpacks/libpak/v2/internal"
"github.com/paketo-buildpacks/libpak/v2/log"
"github.com/paketo-buildpacks/libpak/v2/utils"
)

// Build is called by the main function of a buildpack, for build.
func Build(builder libcnb.BuildFunc, options ...libcnb.Option) {
libcnb.Build(buildDelegate{delegate: builder}.Build,
libcnb.NewConfig(append([]libcnb.Option{
libcnb.WithEnvironmentWriter(internal.NewEnvironmentWriter()),
libcnb.WithExitHandler(internal.NewExitHandler()),
libcnb.WithTOMLWriter(internal.NewTOMLWriter()),
libcnb.WithEnvironmentWriter(utils.NewEnvironmentWriter()),
libcnb.WithExitHandler(utils.NewExitHandler()),
libcnb.WithTOMLWriter(utils.NewTOMLWriter()),
}, options...)...))
}

Expand Down
4 changes: 2 additions & 2 deletions buildmodule_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ import (
"github.com/sclevine/spec"

"github.com/paketo-buildpacks/libpak/v2"
"github.com/paketo-buildpacks/libpak/v2/internal"
"github.com/paketo-buildpacks/libpak/v2/log"
"github.com/paketo-buildpacks/libpak/v2/sbom"
"github.com/paketo-buildpacks/libpak/v2/utils"
)

func testBuildpack(t *testing.T, context spec.G, it spec.S) {
Expand All @@ -56,7 +56,7 @@ func testBuildpack(t *testing.T, context spec.G, it spec.S) {
},
}

bytes, err := internal.Marshal(dependency)
bytes, err := utils.Marshal(dependency)
Expect(err).NotTo(HaveOccurred())

var newDependency libpak.BuildModuleDependency
Expand Down
71 changes: 0 additions & 71 deletions carton/build_image_dependency.go

This file was deleted.

74 changes: 0 additions & 74 deletions carton/build_image_dependency_test.go

This file was deleted.

195 changes: 0 additions & 195 deletions carton/buildmodule_dependency.go

This file was deleted.

Loading

0 comments on commit 578a465

Please sign in to comment.