MCPcopy Create free account
hub / github.com/GoogleCloudPlatform/buildpacks / SupportsSmartDefaultEntrypoint

Function SupportsSmartDefaultEntrypoint

pkg/python/python.go:149–158  ·  view source on GitHub ↗

SupportsSmartDefaultEntrypoint returns true if the runtime version supports smart default entrypoint.

(ctx *gcp.Context)

Source from the content-addressed store, hash-verified

147 latestPythonVersionForStack, ok := latestPythonVersionPerStack[os]
148 if !ok {
149 return "", gcp.UserErrorf("invalid stack for Python runtime: %q", os)
150 }
151
152 ctx.Logf("Python version not specified, using the latest available Python runtime for the stack %q", os)
153 return latestPythonVersionForStack, nil
154}
155
156// SupportsSmartDefaultEntrypoint returns true if the runtime version supports smart default entrypoint.
157func SupportsSmartDefaultEntrypoint(ctx *gcp.Context) (bool, error) {
158 v, err := RuntimeVersion(ctx, ctx.ApplicationRoot())
159 if err != nil {
160 return false, err
161 }

Callers 2

BuildFnFunction · 0.92

Calls 3

versionMatchesSemverFunction · 0.85
ApplicationRootMethod · 0.80
RuntimeVersionFunction · 0.70

Tested by 1