-
Notifications
You must be signed in to change notification settings - Fork 12
feat: add ability to pin major, minor or patch version #91
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
Conversation
Awesome work @seowalex! This looks like the cleanest way to implement this. The only thing I don't really like is the name of the option. It probably isn't the most descriptive and I'd also rather avoid defining a struct with the same name as a standard library struct/type/whatever it is (I still don't know how to use it 🤣). Maybe it would be better if it were named something more descriptive, although I'll admit that I don't have very good ideas ( Also, one more thing: if you're familiar with JSON schema, could you please update the config file schema ( Thanks for the PR! (and sorry for the lengthy response) |
Hi @sergi0g, apologies for the delayed reply. I agree that Can I suggest:
Let me know what you think! |
Hey, Another thing I was thinking about is that users would probably want to override this option on some images, so another option would have to be added. I don't want to pressure you to do more work. You can leave this PR here if you want to and I'll merge and continue. It's up to you. |
I think this is an excellent point, and I think you've changed my mind. Shall we settle on
As for overriding this option on images, I agree that would be useful. Do you think that these overrides should live under the "images" setting, or under this setting? |
Sounds good!
|
As discussed, I have changed the setting to (As a side note, contributing to Cup has been an extremely positive experience, keep up the good work!) |
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.
Awesome! I'm merging this!
Congratulations on your second contribution!
Really? I wonder what I'm doing correctly. 😂 By the way, since I finally found someone knowing better Rust than me and willing to contribute, if you have any ideas on how to clean up and/or optimize the code, I'd love to hear them! Thanks! |
As referenced in #75 (comment), I have implemented version pinning for updates. Some examples:
No pinning (current behaviour):
Pin major updates:
Pin minor updates:
Pin patch updates:
I am open to a different configuration name, as I'm not sure that
pin
is necessarily the most descriptive. Please also let me know if you prefer an alternative implementation; this was just what fit my use-case the best.