Skip to content

Commit

Permalink
Inline homepage
Browse files Browse the repository at this point in the history
Signed-off-by: Zander Mackie <zmackie@gmail.com>
  • Loading branch information
zmackie committed Apr 1, 2020
1 parent 6150a0a commit 5b2e85b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion internal/buildpackage/builder_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -545,7 +545,7 @@ func testPackageBuilder(t *testing.T, when spec.G, it spec.S) {
// buildpackage metadata
h.ContentContains(`"io.buildpacks.buildpackage.metadata":"{\"id\":\"bp.1.id\",\"version\":\"bp.1.version\",\"stacks\":[{\"id\":\"stack.id.1\"},{\"id\":\"stack.id.2\"}]}"`),
// buildpack layers metadata
h.ContentContains(`"io.buildpacks.buildpack.layers":"{\"bp.1.id\":{\"bp.1.version\":{\"api\":\"0.2\",\"stacks\":[{\"id\":\"stack.id.1\"},{\"id\":\"stack.id.2\"}],\"layerDiffID\":\"sha256:a10862daec7a8a62fd04cc5d4520fdb80d4d5c07a3c146fb604a9c23c22fd5b0\",\"info\":{}}}}"`),
h.ContentContains(`"io.buildpacks.buildpack.layers":"{\"bp.1.id\":{\"bp.1.version\":{\"api\":\"0.2\",\"stacks\":[{\"id\":\"stack.id.1\"},{\"id\":\"stack.id.2\"}],\"layerDiffID\":\"sha256:a10862daec7a8a62fd04cc5d4520fdb80d4d5c07a3c146fb604a9c23c22fd5b0\"}}}"`),
)
}))
}))
Expand Down
12 changes: 6 additions & 6 deletions internal/dist/dist.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ type BuildpackRef struct {
type BuildpackLayers map[string]map[string]BuildpackLayerInfo

type BuildpackLayerInfo struct {
API *api.Version `json:"api"`
Stacks []Stack `json:"stacks,omitempty"`
Order Order `json:"order,omitempty"`
LayerDiffID string `json:"layerDiffID"`
Info BuildpackInfo `json:"info,omitempty"`
API *api.Version `json:"api"`
Stacks []Stack `json:"stacks,omitempty"`
Order Order `json:"order,omitempty"`
LayerDiffID string `json:"layerDiffID"`
Homepage string `json:"homepage,omitempty"`
}

func AddBuildpackToLayersMD(layerMD BuildpackLayers, descriptor BuildpackDescriptor, diffID string) {
Expand All @@ -48,6 +48,6 @@ func AddBuildpackToLayersMD(layerMD BuildpackLayers, descriptor BuildpackDescrip
Stacks: descriptor.Stacks,
Order: descriptor.Order,
LayerDiffID: diffID,
Info: BuildpackInfo{Homepage: bpInfo.Homepage},
Homepage: bpInfo.Homepage,
}
}
2 changes: 1 addition & 1 deletion pack.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ func extractPackagedBuildpacks(ctx context.Context, pkgImageRef string, fetcher
Info: dist.BuildpackInfo{
ID: bpID,
Version: bpVersion,
Homepage: bpInfo.Info.Homepage,
Homepage: bpInfo.Homepage,
},
Stacks: bpInfo.Stacks,
Order: bpInfo.Order,
Expand Down

0 comments on commit 5b2e85b

Please sign in to comment.