-
Notifications
You must be signed in to change notification settings - Fork 13
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
introduce new --skip-initial-tidy
flag
#36
Conversation
This flag would be useful for the cases where old packages contains old dependencies that would require to do _replace_ or _update_ before running `go mod tidy`. Signed-off-by: Dentrax <[email protected]>
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.
Looks good to me overall. @Dentrax Could you a test to test this new functionality ?
Once we ship it, we should add a flag to the gobump pipeline in Wolfi. |
Thank you @hectorj2f, I have tried to add a unit test but I'm not sure if I did handle the case correctly. Please take a look when possible. |
a2c16f9
to
55c69df
Compare
Signed-off-by: Dentrax <[email protected]>
55c69df
to
963fcae
Compare
CI is failing because of: |
Signed-off-by: Hector Fernandez <[email protected]> Signed-off-by: hectorj2f <[email protected]>
e211f82
to
aa1ef56
Compare
Thanks for the fixing the CI issue! |
This flag would be useful for the cases where old packages contains old dependencies that would require to do replace or update before running
go mod tidy
.For example, for the following case:
https://github.com/iwilltry42/confd
It's impossible to use
gobump
since one of dependencies got renamed, that required replace first:The new
--skip-initial-tidy
flag solves that by skipping the firstgo mod tidy
run. So that we able to do required updates and replaces before rungo mod tidy
.Do
git reset --hard
and append the new--skip-initial-tidy
flag, then expect to see a success output: