forked from paketo-buildpacks/python-start
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.go
31 lines (27 loc) · 804 Bytes
/
build.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
package pythonstart
import (
"github.com/paketo-buildpacks/packit"
"github.com/paketo-buildpacks/packit/scribe"
)
// Build will return a packit.BuildFunc that will be invoked during the build
// phase of the buildpack lifecycle.
//
// Build assigns the image a launch process to run the Python REPL.
func Build(logger scribe.Logger) packit.BuildFunc {
return func(context packit.BuildContext) (packit.BuildResult, error) {
logger.Title("%s %s", context.BuildpackInfo.Name, context.BuildpackInfo.Version)
logger.Process("Assigning launch process")
command := "python"
logger.Subprocess("web: %s", command)
return packit.BuildResult{
Launch: packit.LaunchMetadata{
Processes: []packit.Process{
{
Type: "web",
Command: command,
},
},
},
}, nil
}
}