Skip to content

Commit

Permalink
Single Entrypoint
Browse files Browse the repository at this point in the history
Signed-off-by: Ben Hale <[email protected]>
  • Loading branch information
nebhale committed May 5, 2020
1 parent f4408d4 commit 0c68545
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 29 deletions.
1 change: 1 addition & 0 deletions buildpack.toml
Original file line number Diff line number Diff line change
Expand Up @@ -46,5 +46,6 @@ include-files = [
"README.md",
"bin/build",
"bin/detect",
"bin/main",
"buildpack.toml",
]
26 changes: 0 additions & 26 deletions cmd/detect/main.go

This file was deleted.

5 changes: 4 additions & 1 deletion cmd/build/main.go → cmd/main/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,8 @@ import (
)

func main() {
libpak.Build(maven.Build{Logger: bard.NewLogger(os.Stdout)})
libpak.Main(
maven.Detect{},
maven.Build{Logger: bard.NewLogger(os.Stdout)},
)
}
5 changes: 3 additions & 2 deletions scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@ if [[ -d ../go-cache ]]; then
export GOPATH
fi

GOOS="linux" go build -ldflags='-s -w' -tags osusergo -o bin/build github.com/paketo-buildpacks/maven/cmd/build
GOOS="linux" go build -ldflags='-s -w' -tags osusergo -o bin/detect github.com/paketo-buildpacks/maven/cmd/detect
GOOS="linux" go build -ldflags='-s -w' -tags osusergo -o bin/main github.com/paketo-buildpacks/maven/cmd/main
ln -fs main bin/build
ln -fs main bin/detect

0 comments on commit 0c68545

Please sign in to comment.