Skip to content

Commit

Permalink
Release-bundle creation to sync mode as default
Browse files Browse the repository at this point in the history
  • Loading branch information
davidlesfrog committed Nov 12, 2024
1 parent 560584b commit 7ca715f
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion lifecycle/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -165,13 +165,23 @@ func create(c *cli.Context) (err error) {
return
}

sync := syncDefaultValueTrue(c)

createCmd := lifecycle.NewReleaseBundleCreateCommand().SetServerDetails(lcDetails).SetReleaseBundleName(c.Args().Get(0)).
SetReleaseBundleVersion(c.Args().Get(1)).SetSigningKeyName(c.String(cliutils.SigningKey)).SetSync(c.Bool(cliutils.Sync)).
SetReleaseBundleVersion(c.Args().Get(1)).SetSigningKeyName(c.String(cliutils.SigningKey)).SetSync(sync).
SetReleaseBundleProject(cliutils.GetProject(c)).SetSpec(creationSpec).
SetBuildsSpecPath(c.String(cliutils.Builds)).SetReleaseBundlesSpecPath(c.String(cliutils.ReleaseBundles))
return commands.Exec(createCmd)
}

func syncDefaultValueTrue(c *cli.Context) bool {
sync := true
if c.IsSet(cliutils.Sync) {
sync = c.Bool(cliutils.Sync)
}
return sync
}

func getReleaseBundleCreationSpec(c *cli.Context) (*spec.SpecFiles, error) {
if c.IsSet("spec") {
return cliutils.GetSpec(c, true, false)
Expand Down

0 comments on commit 7ca715f

Please sign in to comment.