-
Notifications
You must be signed in to change notification settings - Fork 16
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
Rename arguments #6
Conversation
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.
Thanks for the PR! I love the spelling fixes and the consistency with Go conventions. To avoid breaking current users, would it be possible to support the old argument names too? They don't need to show up in the help documentation, but it would be nice if a new version didn't break anybody.
I'm afraid it would be pretty hard to accomplish that, as kingpin.Flag code that defines flag names is executed before parsing, so I'm unable to "fallback" in buildRegistryArguments as flags are not parsed yet. My second try was to use the same pointer for two flag names, like that:
But unfortunately it causes program to crash for unknown reason... Tried to debug that but without success :( Any ideas on how to implement that? |
Thanks for attempting to make it work. It doesn't jump out to my why it would crash and it's probably not worth the trouble. On re-review i noticed that there are still some references to the old style of argument in the README. Can you update that file to match (and maybe search the code for other lingering references)? |
Done :) BTW: I've extended the project a little on my fork (https://github.com/tomaszkiewicz/docker-copy-docker-image) by adding Dockerfile (based on alpine instead of scratch, so can be used on Jenkins) and changing some ECR logic so it doesn't require AWS config file with region specified (it uses url and gets region from ECR url - very convenient when used in container). |
I'm happy to merge any PRs that make the tool more usable. Both of your ideas sound useful to me. If you open PRs I'm happy to review and get them merged |
This pull request renames arguments to be compatible with styling of docker and Go commands.
Also fixes a couple of typos.