Skip to content

Commit

Permalink
corrected to get profile and code
Browse files Browse the repository at this point in the history
  • Loading branch information
Prabeshpd committed Oct 11, 2019
1 parent 756ede9 commit 4985cb7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion cli/internal/config/aws-config.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ func getRegionsWithCode() map[string]string {
func GetRegions() []string {
var regions []string

for _, key := range getRegionsWithCode() {
for key := range getRegionsWithCode() {
regions = append(regions, key)
}

Expand Down
8 changes: 6 additions & 2 deletions cli/internal/setup/setup.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ type backendBuildInformation struct {
type deployment struct {
Name string `json:"name"`
Platform string `json:"platform"`
Profile string `json:"profile"`
Region string `json:"region"`
Type string `json:"type"`
BuildCommand string `json:"buildCommand"`
DistFolder string `json:"distFolder"`
Expand Down Expand Up @@ -87,14 +89,14 @@ func askDeploymentDetails() *deploymentDetails {
},
},
{
Name: "awsProfile",
Name: "Profile",
Prompt: &survey.Select{
Message: "Chose Aws Profile:",
Options: config.GetProfiles(),
},
},
{
Name: "awsRegion",
Name: "Region",
Prompt: &survey.Select{
Message: "Region:",
Options: config.GetRegions(),
Expand Down Expand Up @@ -211,6 +213,8 @@ func Run() {
Deployment: deployment{
Name: deploymentDetails.DeploymentName,
Platform: deploymentDetails.CloudProvider,
Profile: deploymentDetails.Profile,
Region: deploymentDetails.Region,
Type: deploymentDetails.DeploymentType,
BuildCommand: frontendBuildInformation.BuildCommand,
DistFolder: frontendBuildInformation.DistFolder,
Expand Down

0 comments on commit 4985cb7

Please sign in to comment.