Skip to content

Commit

Permalink
Merge pull request #763 from dwillist/460-remove-symlink
Browse files Browse the repository at this point in the history
460 remove symlink
  • Loading branch information
jromero authored Jul 27, 2020
2 parents 5c7a693 + 1b2e365 commit fd52b6a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 26 deletions.
23 changes: 6 additions & 17 deletions internal/builder/builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,12 @@ const (

cnbDir = "/cnb"

orderPath = "/cnb/order.toml"
stackPath = "/cnb/stack.toml"
platformDir = "/platform"
lifecycleDir = "/cnb/lifecycle"
compatLifecycleDir = "/lifecycle"
workspaceDir = "/workspace"
layersDir = "/layers"
orderPath = "/cnb/order.toml"
stackPath = "/cnb/stack.toml"
platformDir = "/platform"
lifecycleDir = "/cnb/lifecycle"
workspaceDir = "/workspace"
layersDir = "/layers"

metadataLabel = "io.buildpacks.builder.metadata"
stackLabel = "io.buildpacks.stack.id"
Expand Down Expand Up @@ -703,15 +702,5 @@ func (b *Builder) lifecycleLayer(dest string) (string, error) {
return "", errors.Wrap(err, "embedding lifecycle tar")
}

if err := lw.WriteHeader(&tar.Header{
Name: compatLifecycleDir,
Linkname: lifecycleDir,
Typeflag: tar.TypeSymlink,
Mode: 0644,
ModTime: archive.NormalizedDateTime,
}); err != nil {
return "", errors.Wrapf(err, "creating %s symlink", style.Symbol(compatLifecycleDir))
}

return fh.Name(), nil
}
8 changes: 0 additions & 8 deletions internal/builder/builder_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -589,14 +589,6 @@ func testBuilder(t *testing.T, when spec.G, it spec.S) {
h.HasFileMode(0755),
h.HasModTime(archive.NormalizedDateTime),
)

it("should add lifecycle symlink", func() {
h.AssertOnTarEntry(t, layerTar, "/lifecycle",
h.SymlinksTo("/cnb/lifecycle"),
h.HasFileMode(0644),
h.HasModTime(archive.NormalizedDateTime),
)
})
})

it("sets the lifecycle version on the metadata", func() {
Expand Down
2 changes: 1 addition & 1 deletion internal/commands/set_run_image_mirrors_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (
)

func TestSetRunImageMirrorsCommand(t *testing.T) {
spec.Run(t, "Commands", testSetRunImageMirrorsCommand, spec.Parallel(), spec.Report(report.Terminal{}))
spec.Run(t, "Commands", testSetRunImageMirrorsCommand, spec.Sequential(), spec.Report(report.Terminal{}))
}

func testSetRunImageMirrorsCommand(t *testing.T, when spec.G, it spec.S) {
Expand Down

0 comments on commit fd52b6a

Please sign in to comment.