Skip to content
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

Merged
merged 2 commits into from Nov 13, 2019

Conversation

bmonkman
Copy link
Member

…s and account id


defaultProjConfig := defaultProjConfig(projectName)

defaultProjConfig.Infrastructure.AWS.Region = regionResult
if awsCaller != nil && awsCaller.Account != nil {
defaultProjConfig.Infrastructure.AWS.AccountID = *awsCaller.Account
Copy link
Contributor

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)

Copy link
Contributor

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.

Copy link
Member Author

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

@zthomas zthomas merged commit 2dd20ea into master Nov 13, 2019
@zthomas zthomas deleted the add-prompts-during-create-and-profile-lookup branch November 13, 2019 05:32
if err != nil {
t.Fatal(err)
}
// @TODO : Figure out a way to test this
Copy link
Contributor

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

Copy link
Member Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants