feat(14.3-01): detect the framework checkout and guard summer new targets
- resolve the framework from --framework, then a sibling summercms or summercms.go checkout, then the binary's own source tree, each accepted only when its go.mod declares the framework module - refuse a missing parent and a target inside the framework checkout - remove the half-written app when any step fails - add --no-plugin for an app with no starter plugin
This commit is contained in:
@@ -309,7 +309,8 @@ func newCommand() bonfire.Command {
|
||||
Required: true,
|
||||
}},
|
||||
Flags: []bonfire.Flag{
|
||||
{Name: "framework", Description: "Path to the framework checkout"},
|
||||
{Name: "framework", Description: "Path to the framework checkout (default: a sibling summercms or summercms.go checkout)"},
|
||||
{Name: "no-plugin", Description: "Do not create the starter plugin", Bare: true},
|
||||
},
|
||||
Run: func(ctx context.Context, in bonfire.Input, out bonfire.Output) error {
|
||||
name, ok := in.Argument("name")
|
||||
@@ -325,6 +326,7 @@ func newCommand() bonfire.Command {
|
||||
Name: name,
|
||||
Parent: dir,
|
||||
Framework: framework,
|
||||
NoPlugin: flagTrue(in, "no-plugin"),
|
||||
}, out)
|
||||
return err
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user