diff --git a/packagers/jam.go b/packagers/jam.go index fc3a1af..373281a 100644 --- a/packagers/jam.go +++ b/packagers/jam.go @@ -106,11 +106,21 @@ func (j Jam) Execute(buildpackDir, output, version string, offline bool) error { } - args = []string{ - "buildpack", "package", - output, - "--format", "file", - "--target", fmt.Sprintf("linux/%s", runtime.GOARCH), + if ( command == "--buildpack") { + args = []string{ + "buildpack", "package", + output, + "--format", "file", + "--target", fmt.Sprintf("linux/%s", runtime.GOARCH), + } + } else { + // pack extension does not yet support multi-arch + // update to inclue --target once it does + args = []string{ + "extension", "package", + output, + "--format", "file", + } } err = j.pack.Execute(pexec.Execution{ diff --git a/packagers/jam_test.go b/packagers/jam_test.go index 381aeb4..10a9a26 100644 --- a/packagers/jam_test.go +++ b/packagers/jam_test.go @@ -109,10 +109,9 @@ func testJam(t *testing.T, context spec.G, it spec.S) { })) Expect(pack.ExecuteCall.Receives.Execution.Args).To(Equal([]string{ - "buildpack", "package", + "extension", "package", "some-output", "--format", "file", - "--target", fmt.Sprintf("linux/%s", runtime.GOARCH), })) }) })