Skip to content

Commit

Permalink
chore: Add Python 3.12 environment (kyma-project#1976)
Browse files Browse the repository at this point in the history
* Add Python 3.12

* docs: fix identation
  • Loading branch information
halamix2 authored and pPrecel committed May 20, 2024
1 parent d866891 commit 360c6bd
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
3 changes: 2 additions & 1 deletion cmd/kyma/init/function/function.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@ Use the flags to specify the initial configuration for your Function or to choos
`Flag used to define the environment for running your Function. Use one of these options:
- nodejs16 (deprecated)
- nodejs18
- python39`,
- python39
- python312`,
)
cmd.Flags().StringVar(&o.SchemaVersion, "schema-version", string(workspace.SchemaVersionDefault), `Version of the config API.`)

Expand Down
7 changes: 4 additions & 3 deletions cmd/kyma/run/function/function.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,10 @@ func (c *command) workspaceConfig(path string) (workspace.Cfg, error) {
}

supportedRuntimes := map[string]struct{}{
"nodejs16": {},
"nodejs18": {},
"python39": {},
"nodejs16": {},
"nodejs18": {},
"python39": {},
"python312": {},
}
if _, ok := supportedRuntimes[cfg.Runtime]; !ok {
return workspace.Cfg{}, fmt.Errorf("unsupported runtime: %s", cfg.Runtime)
Expand Down
3 changes: 2 additions & 1 deletion docs/gen-docs/kyma_init_function.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ kyma init function [flags]
-r, --runtime string Flag used to define the environment for running your Function. Use one of these options:
- nodejs16 (deprecated)
- nodejs18
- python39 (default "nodejs18")
- python39
- python312 (default "nodejs18")
--runtime-image-override string Set custom runtime image base.
--schema-version string Version of the config API. (default "v0")
--url string Git repository URL
Expand Down

0 comments on commit 360c6bd

Please sign in to comment.