Skip to content

Commit d3b94ca

Browse files
committed
feat: update sumdb and dependencies
Signed-off-by: Chen Keinan <hen.keinan@gmail.com>
1 parent 7c8a391 commit d3b94ca

1 file changed

Lines changed: 10 additions & 12 deletions

File tree

pkg/cmd/release/promote/promote.go

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -435,20 +435,8 @@ func AskQuestions(octopus *octopusApiClient.Client, stdout io.Writer, asker ques
435435
return err
436436
}
437437

438-
// select release
439-
440438
var selectedRelease *releases.Release
441439
var selectedChannel *channels.Channel
442-
if options.SourceEnvironment == "" {
443-
selectedSourceEnvironment, err := selectors.EnvironmentSelect(asker, func() ([]*environments.Environment, error) {
444-
return selectors.GetAllEnvironments(octopus)
445-
}, "Select source environment")
446-
if err != nil {
447-
return err
448-
}
449-
_, _ = fmt.Fprintf(stdout, "Source Environment %s\n", output.Cyan(selectedSourceEnvironment.Name))
450-
options.SourceEnvironment = selectedSourceEnvironment.Name
451-
}
452440
if options.ReleaseVersion == "" {
453441
// first we want to ask them to pick a channel just to narrow down the search space for releases (not sent to server)
454442
selectedChannel, err = selectors.Channel(octopus, asker, stdout, "Select channel", selectedProject)
@@ -484,6 +472,16 @@ func AskQuestions(octopus *octopusApiClient.Client, stdout io.Writer, asker ques
484472
}
485473
}
486474

475+
if options.SourceEnvironment == "" {
476+
selectedSourceEnvironment, err := selectors.EnvironmentSelect(asker, func() ([]*environments.Environment, error) {
477+
return selectors.GetAllEnvironments(octopus)
478+
}, "Select source environment")
479+
if err != nil {
480+
return err
481+
}
482+
_, _ = fmt.Fprintf(stdout, "Source Environment %s\n", output.Cyan(selectedSourceEnvironment.Name))
483+
options.SourceEnvironment = selectedSourceEnvironment.Name
484+
}
487485
// machine selection later on needs to refer back to the environments.
488486
// NOTE: this is allowed to remain nil; environments will get looked up later on if needed
489487
var deploymentEnvironmentIDs []string

0 commit comments

Comments
 (0)