Skip to content

Commit fe6f2da

Browse files
authored
cleaned up unused prompts (#106)
* cleaned up unused prompts
1 parent 705b4f3 commit fe6f2da

File tree

4 files changed

+5
-21
lines changed

4 files changed

+5
-21
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ name: newProject
8686
context:
8787
cognitoPoolID: xxx
8888
modules:
89-
- source: "github.com/zthomas/commit0-terraform-basic"
89+
- source: "github.com/commit0/commit0-aws-eks-stack"
9090
output: "infrastructure"
9191
- source: "github.com/zthomas/react-mui-kit"
9292
output: "web-app"

internal/config/create_example.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@ package config
22

33
import (
44
"fmt"
5-
"github.com/commitdev/commit0/pkg/util/exit"
65
"io/ioutil"
76
"path"
7+
8+
"github.com/commitdev/commit0/pkg/util/exit"
89
)
910

1011
const exampleConfig = `name: %s
@@ -19,7 +20,7 @@ context:
1920
# - output: "github-actions"
2021
2122
modules:
22-
- source: "github.com/zthomas/commit0-terraform-basic"`
23+
- source: "github.com/commit0/commit0-aws-eks-stack"`
2324

2425
func CreateExample(projectName string) {
2526
content := []byte(fmt.Sprintf(exampleConfig, projectName))

internal/context/create.go

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -51,22 +51,7 @@ func chooseCloudProvider(projectConfig *config.Commit0Config) {
5151
panic(err)
5252
}
5353

54-
if providerResult == "Amazon AWS" {
55-
projectConfig.Infrastructure.AWS = &config.AWS{}
56-
regionPrompt := promptui.Select{
57-
Label: "Select AWS Region ",
58-
Items: []string{"us-west-1", "us-west-2", "us-east-1", "us-east-2", "ca-central-1",
59-
"eu-central-1", "eu-west-1", "ap-east-1", "ap-south-1"},
60-
}
61-
62-
_, regionResult, err := regionPrompt.Run()
63-
64-
if err != nil {
65-
exit.Fatal("Prompt failed %v\n", err)
66-
}
67-
68-
projectConfig.Infrastructure.AWS.Region = regionResult
69-
} else {
54+
if providerResult != "Amazon AWS" {
7055
exit.Fatal("Only the AWS provider is available at this time")
7156
}
7257
}

pkg/credentials/credentials.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,6 @@ func GetSecrets(baseDir string) Secrets {
9494
}
9595
}
9696

97-
// @TODO deprecate
98-
// writeSecrets(secretsFile, secrets)
9997
return secrets
10098
}
10199
}

0 commit comments

Comments
 (0)