diff --git a/buildpack.toml b/buildpack.toml index 4485d4c..79c22d9 100644 --- a/buildpack.toml +++ b/buildpack.toml @@ -12,13 +12,19 @@ # See the License for the specific language governing permissions and # limitations under the License. -api = "0.5" +api = "0.6" [buildpack] id = "paketo-buildpacks/dist-zip" name = "Paketo DistZip Buildpack" version = "{{.version}}" homepage = "https://github.com/paketo-buildpacks/dist-zip" +description = "A Cloud Native Buildpack that contributes a Process Type for DistZip-style applications" +keywords = ["java", "dist-zip"] + +[[buildpack.licenses]] +type = "Apache-2.0" +uri = "https://github.com/paketo-buildpacks/dist-zip/blob/main/LICENSE" [[stacks]] id = "io.buildpacks.stacks.bionic" diff --git a/distzip/build.go b/distzip/build.go index 3adfa51..3b47677 100644 --- a/distzip/build.go +++ b/distzip/build.go @@ -62,7 +62,7 @@ func (b Build) Build(context libcnb.BuildContext) (libcnb.BuildResult, error) { result.Processes = append(result.Processes, libcnb.Process{Type: "dist-zip", Command: s}, libcnb.Process{Type: "task", Command: s}, - libcnb.Process{Type: "web", Command: s}, + libcnb.Process{Type: "web", Command: s, Default: true}, ) return result, nil diff --git a/distzip/build_test.go b/distzip/build_test.go index 01072e9..c7e1fe1 100644 --- a/distzip/build_test.go +++ b/distzip/build_test.go @@ -74,7 +74,7 @@ func testBuild(t *testing.T, context spec.G, it spec.S) { Expect(result.Processes).To(ContainElements( libcnb.Process{Type: "dist-zip", Command: filepath.Join(ctx.Application.Path, "app", "bin", "test-script")}, libcnb.Process{Type: "task", Command: filepath.Join(ctx.Application.Path, "app", "bin", "test-script")}, - libcnb.Process{Type: "web", Command: filepath.Join(ctx.Application.Path, "app", "bin", "test-script")}, + libcnb.Process{Type: "web", Command: filepath.Join(ctx.Application.Path, "app", "bin", "test-script"), Default: true}, )) }) }) diff --git a/scripts/build.sh b/scripts/build.sh index 2bfc626..55df1e0 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -4,8 +4,13 @@ set -euo pipefail GOOS="linux" go build -ldflags='-s -w' -o bin/main github.com/paketo-buildpacks/dist-zip/cmd/main -strip bin/main -upx -q -9 bin/main +if [ "${STRIP:-false}" != "false" ]; then + strip bin/main +fi + +if [ "${COMPRESS:-false}" != "false" ]; then + upx -q -9 bin/main +fi ln -fs main bin/build ln -fs main bin/detect