Skip to content

Commit

Permalink
Merge pull request #71 from paketo-buildpacks/updates
Browse files Browse the repository at this point in the history
Buildpack metadata updates
  • Loading branch information
Daniel Mikusa committed Jun 2, 2021
2 parents 588143a + 6630122 commit a12213e
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 6 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/native-image"
name = "Paketo Native Image Buildpack"
version = "{{.version}}"
homepage = "https://github.com/paketo-buildpacks/native-image"
description = "A Cloud Native Buildpack that creates native images from Java applications"
keywords = ["java", "native-image", "spring-boot"]

[[buildpack.licenses]]
type = "Apache-2.0"
uri = "https://github.com/paketo-buildpacks/native-image/blob/main/LICENSE"

[[stacks]]
id = "io.buildpacks.stacks.bionic"
Expand Down
2 changes: 1 addition & 1 deletion native/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ func (b Build) Build(context libcnb.BuildContext) (libcnb.BuildResult, error) {
result.Processes = append(result.Processes,
libcnb.Process{Type: "native-image", Command: command, Direct: true},
libcnb.Process{Type: "task", Command: command, Direct: true},
libcnb.Process{Type: "web", Command: command, Direct: true},
libcnb.Process{Type: "web", Command: command, Direct: true, Default: true},
)

return result, nil
Expand Down
4 changes: 2 additions & 2 deletions native/build_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ Start-Class: test-start-class
Expect(result.Processes).To(ContainElements(
libcnb.Process{Type: "native-image", Command: filepath.Join(ctx.Application.Path, "test-start-class"), Direct: true},
libcnb.Process{Type: "task", Command: filepath.Join(ctx.Application.Path, "test-start-class"), Direct: true},
libcnb.Process{Type: "web", Command: filepath.Join(ctx.Application.Path, "test-start-class"), Direct: true},
libcnb.Process{Type: "web", Command: filepath.Join(ctx.Application.Path, "test-start-class"), Direct: true, Default: true},
))
})

Expand Down Expand Up @@ -118,7 +118,7 @@ Start-Class: test-start-class
Expect(result.Processes).To(ContainElements(
libcnb.Process{Type: "native-image", Command: filepath.Join(ctx.Application.Path, "test-start-class"), Direct: true},
libcnb.Process{Type: "task", Command: filepath.Join(ctx.Application.Path, "test-start-class"), Direct: true},
libcnb.Process{Type: "web", Command: filepath.Join(ctx.Application.Path, "test-start-class"), Direct: true},
libcnb.Process{Type: "web", Command: filepath.Join(ctx.Application.Path, "test-start-class"), Direct: true, Default: true},
))

Expect(out.String()).To(ContainSubstring("$BP_BOOT_NATIVE_IMAGE has been deprecated. Please use $BP_NATIVE_IMAGE instead."))
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/native-image/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 a12213e

Please sign in to comment.