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

Add the 'version' field in TOML #68

Open
chshersh opened this issue Sep 7, 2022 · 3 comments
Open

Add the 'version' field in TOML #68

chshersh opened this issue Sep 7, 2022 · 3 comments
Labels
config TOML configuration, config-related CLI options

Comments

@chshersh
Copy link
Owner

chshersh commented Sep 7, 2022

This field is an alternative to the tag field (so it should be an error to specify both of them).

This field should support more flexible version matching of tags while the tag field supports tags exactly. With version, it should be possible to specify the following:

version = "latest"  # uses exactly the latest version
version = "13.0.0"  # matches both tags 'v13.0.0' and '13.0.0' so you don't need to know the naming scheme of a particular repository
version = "13"      # should automatically download the latest minor version matching '13.*.*'

See the following issue for more context:

@chshersh chshersh added the config TOML configuration, config-related CLI options label Sep 7, 2022
@MitchellBerend
Copy link
Collaborator

MitchellBerend commented Sep 23, 2022

I think regex is also a good option to solve this issue. I'm starting to lean towards adding the regex crate more and more since #50 and #116 probably would also benefit from this.

@chshersh
Copy link
Owner Author

Maybe we can use wildmatch as suggested before? And if this is not enough, we can use regex instead. I believe, with wildmatch is should be possible to write 13.*.* and it should match what we want. It doesn't check as substring so it'll actually check from the beginning which is what we want (if I correctly understand the docs but this can be double-checked in the code).

@MitchellBerend
Copy link
Collaborator

There is no end of pattern marker in wildmatch I think so 13.*.*-alpha (like in mirrord) would also be matched with 13.*.*

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
config TOML configuration, config-related CLI options
Projects
None yet
Development

No branches or pull requests

2 participants