Skip to content

Commit

Permalink
Bump the lifecycle to 0.6, add description, keywords and license meta…
Browse files Browse the repository at this point in the history
…data and make running 'upx' optional, default off in build script, and sets web as the default process type
  • Loading branch information
Daniel Mikusa committed Jun 2, 2021
1 parent ac7a8e4 commit 9d22ebb
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 5 deletions.
8 changes: 7 additions & 1 deletion buildpack.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion distzip/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion distzip/build_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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},
))
})
})
Expand Down
9 changes: 7 additions & 2 deletions scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 9d22ebb

Please sign in to comment.