Skip to content

Commit

Permalink
feat: support .env.example to cli templates
Browse files Browse the repository at this point in the history
  • Loading branch information
Yeuoly committed Nov 11, 2024
1 parent 939b9d3 commit 7c8b1bc
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
6 changes: 6 additions & 0 deletions cmd/commandline/init/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,12 @@ func (m model) createPlugin() {
return
}

// create .env.example
if err := writeFile(filepath.Join(plugin_dir, ".env.example"), string(ENV_EXAMPLE)); err != nil {
log.Error("failed to write .env.example file: %s", err)
return
}

err = createPythonEnvironment(
plugin_dir,
manifest.Meta.Runner.Entrypoint,
Expand Down
3 changes: 3 additions & 0 deletions cmd/commandline/init/template.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,6 @@ import (

//go:embed templates/README.md
var README []byte

//go:embed templates/.env.example
var ENV_EXAMPLE []byte
File renamed without changes.

0 comments on commit 7c8b1bc

Please sign in to comment.