New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added prompts at project create, including lookups for aws credential… #77
Conversation
|
||
defaultProjConfig := defaultProjConfig(projectName) | ||
|
||
defaultProjConfig.Infrastructure.AWS.Region = regionResult | ||
if awsCaller != nil && awsCaller.Account != nil { | ||
defaultProjConfig.Infrastructure.AWS.AccountID = *awsCaller.Account |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
@@ -22,16 +29,63 @@ func Create(projectName string, outDir string, t *templator.Templator) string { | |||
rootDir := path.Join(outDir, projectName) | |||
log.Println(aurora.Cyan(emoji.Sprintf(":tada: Creating project %s.", projectName))) | |||
err := os.MkdirAll(rootDir, os.ModePerm) | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The command handlers should be kept slim and we should try to move all the logic deeper into some logical models. Love to plan out a clearer architecture for this project on Friday.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I left a todo there
if err != nil { | ||
t.Fatal(err) | ||
} | ||
// @TODO : Figure out a way to test this |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shane has some ci integration tests to check if the templates populated under /tests
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, this test needs to be moved to a different level now because now this function triggers prompts.
…s and account id