Skip to content

Commit

Permalink
[#82] Refactor CI provider list
Browse files Browse the repository at this point in the history
  • Loading branch information
juampynr committed Jul 6, 2022
1 parent 81adb7b commit 5768da4
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
3 changes: 1 addition & 2 deletions cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,10 @@ func getCIProvider(args []string) (*string, error) {
if len(args) > 1 {
return &args[1], nil
}
ciProviders := []string{"Bitbucket", "CircleCI", "GitHub Actions", "GitLab CI", "Travis CI"}

prompt := promptui.Select{
Label: "Select CI provider",
Items: ciProviders,
Items: scripts.GetCIProviderList(),
}

_, ciProvider, err := prompt.Run()
Expand Down
10 changes: 10 additions & 0 deletions scripts/scripts.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,16 @@ type SetupScripts struct {
TravisCI string
}

func GetCIProviderList() []string {
return []string{
Bitbucket,
CircleCI,
GithubActions,
GitLabCI,
TravisCI,
}
}

func LoadSetupScripts() *SetupScripts {
return &SetupScripts{
BitBucket: setupBitbucket,
Expand Down

0 comments on commit 5768da4

Please sign in to comment.