Add -p flag to build command
ci/woodpecker/push/woodpecker Pipeline was successful
Details
ci/woodpecker/push/woodpecker Pipeline was successful
Details
This commit is contained in:
parent
10893c07c3
commit
dada9d68f2
3
build.go
3
build.go
|
@ -91,6 +91,9 @@ type Scripts struct {
|
||||||
|
|
||||||
func buildCmd(c *cli.Context) error {
|
func buildCmd(c *cli.Context) error {
|
||||||
script := c.String("script")
|
script := c.String("script")
|
||||||
|
if c.String("package") != "" {
|
||||||
|
script = filepath.Join(config.RepoDir, c.String("package"), "lure.sh")
|
||||||
|
}
|
||||||
|
|
||||||
err := repos.Pull(c.Context, gdb, cfg.Repos)
|
err := repos.Pull(c.Context, gdb, cfg.Repos)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
5
main.go
5
main.go
|
@ -160,6 +160,11 @@ func main() {
|
||||||
Value: "lure.sh",
|
Value: "lure.sh",
|
||||||
Usage: "Path to the build script",
|
Usage: "Path to the build script",
|
||||||
},
|
},
|
||||||
|
&cli.StringFlag{
|
||||||
|
Name: "package",
|
||||||
|
Aliases: []string{"p"},
|
||||||
|
Usage: "Name of the package to build and its repo (example: default/go-bin)",
|
||||||
|
},
|
||||||
&cli.BoolFlag{
|
&cli.BoolFlag{
|
||||||
Name: "clean",
|
Name: "clean",
|
||||||
Aliases: []string{"c"},
|
Aliases: []string{"c"},
|
||||||
|
|
Loading…
Reference in New Issue