forked from choria-io/go-choria
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request choria-io#1690 from ripienaar/1665.15
(choria-io#1665) expose the appbuilder cli
- Loading branch information
Showing
4 changed files
with
60 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
// Copyright (c) 2022, R.I. Pienaar and the Choria Project contributors | ||
// | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
package cmd | ||
|
||
import ( | ||
"sync" | ||
|
||
"github.com/choria-io/appbuilder/builder" | ||
) | ||
|
||
type tBuilderCommand struct { | ||
command | ||
} | ||
|
||
func (c *tBuilderCommand) Setup() error { | ||
if tool, ok := cmdWithFullCommand("tool"); ok { | ||
c.cmd = tool.Cmd().Command("builder", "Application Builder tools") | ||
bldr, err := builder.New(ctx, "builder", builderOptions()...) | ||
if err != nil { | ||
return err | ||
} | ||
|
||
// builder cli is Action() based | ||
ran = true | ||
|
||
bldr.CreateBuilderApp(c.cmd) | ||
} | ||
|
||
return nil | ||
} | ||
|
||
func (c *tBuilderCommand) Configure() error { | ||
return nil | ||
} | ||
|
||
func (c *tBuilderCommand) Run(wg *sync.WaitGroup) error { | ||
wg.Done() | ||
return nil | ||
} | ||
|
||
func init() { | ||
cli.commands = append(cli.commands, &tBuilderCommand{}) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters