Skip to content

Commit

Permalink
cleaned up unused prompts (#106)
Browse files Browse the repository at this point in the history
* cleaned up unused prompts
  • Loading branch information
zthomas committed Mar 25, 2020
1 parent 705b4f3 commit fe6f2da
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 21 deletions.
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -86,7 +86,7 @@ name: newProject
context:
cognitoPoolID: xxx
modules:
- source: "github.com/zthomas/commit0-terraform-basic"
- source: "github.com/commit0/commit0-aws-eks-stack"
output: "infrastructure"
- source: "github.com/zthomas/react-mui-kit"
output: "web-app"
Expand Down
5 changes: 3 additions & 2 deletions internal/config/create_example.go
Expand Up @@ -2,9 +2,10 @@ package config

import (
"fmt"
"github.com/commitdev/commit0/pkg/util/exit"
"io/ioutil"
"path"

"github.com/commitdev/commit0/pkg/util/exit"
)

const exampleConfig = `name: %s
Expand All @@ -19,7 +20,7 @@ context:
# - output: "github-actions"
modules:
- source: "github.com/zthomas/commit0-terraform-basic"`
- source: "github.com/commit0/commit0-aws-eks-stack"`

func CreateExample(projectName string) {
content := []byte(fmt.Sprintf(exampleConfig, projectName))
Expand Down
17 changes: 1 addition & 16 deletions internal/context/create.go
Expand Up @@ -51,22 +51,7 @@ func chooseCloudProvider(projectConfig *config.Commit0Config) {
panic(err)
}

if providerResult == "Amazon AWS" {
projectConfig.Infrastructure.AWS = &config.AWS{}
regionPrompt := promptui.Select{
Label: "Select AWS Region ",
Items: []string{"us-west-1", "us-west-2", "us-east-1", "us-east-2", "ca-central-1",
"eu-central-1", "eu-west-1", "ap-east-1", "ap-south-1"},
}

_, regionResult, err := regionPrompt.Run()

if err != nil {
exit.Fatal("Prompt failed %v\n", err)
}

projectConfig.Infrastructure.AWS.Region = regionResult
} else {
if providerResult != "Amazon AWS" {
exit.Fatal("Only the AWS provider is available at this time")
}
}
Expand Down
2 changes: 0 additions & 2 deletions pkg/credentials/credentials.go
Expand Up @@ -94,8 +94,6 @@ func GetSecrets(baseDir string) Secrets {
}
}

// @TODO deprecate
// writeSecrets(secretsFile, secrets)
return secrets
}
}
Expand Down

0 comments on commit fe6f2da

Please sign in to comment.