-
Notifications
You must be signed in to change notification settings - Fork 302
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
Update output file name #798
Conversation
The original thread mentions that we have to update some code to use |
The reason for using filepath.Join is to get the pwd and concat with the file name so that we can get the valid file path for every os system. However, the test case just want to test the ability to create the yml file so I think we don't need to provide the full path. |
https://github.com/aws/amazon-ecs-cli/blob/ecs-local/ecs-cli/modules/cli/local/project/project.go This is not just a test, right? |
Well, I think I have to make some changes. Nice catch. |
Do the latest changes look good to you? |
LocalOutDefaultFileName = "./docker-compose.local.yml" | ||
var ( | ||
wd, _ = os.Getwd() | ||
LocalOutDefaultFileName = filepath.Join(wd, "docker-compose.local.yml") |
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.
Can we leverage this variable in local ps
or local down
? https://github.com/aws/amazon-ecs-cli/blob/ecs-local/ecs-cli/modules/cli/local/ps_app.go#L89
Removing code duplication, the main concern is that for whatever reason if we rename docker-compose.local.yml
to something else we will need to remember to update it in multiple locations instead of just here.
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 agree with you. I think that is doable and will have a try.
-
"flags.LocalOutputFlag" is the string flag for customized yml name. If that flag is set, the default one will not be used. But I think we should get rid of "ecsLocalDockerComposeFileName" in create_app.go because this is not always the name we want.
Manual TestsRun the "create" command
After that, the |
HI @iamhopaul123, In the future, please provide a more descriptive, concise title to your PR and include the "Fixes <issue number" in the commit message. That will allow Github to close the related issue automatically. We probably should have this codified in our own contributing doc, but in the meantime you can take a look at the description for how to title your PRs here as an example. |
Hi @SoManyHs, Thank you for your advice. I am sorry for this PR that might not be clear enough. And I will try to make the PR more descriptive in the future. |
Issue #, if available:
#796
Description of changes:
Enter
[N/A]
in the box, if an item is not applicable to your change.Testing
Documentation
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.