aheckmann / m

mongodb version management
MIT License
267 stars 55 forks source link

Add aliases for MongoDB release series #34

Closed p-mongo closed 6 years ago

p-mongo commented 6 years ago

Is it possible to have something like 4 aliased to 4.0.0.-rc5 for convenience?

stennie commented 6 years ago

@p-mongo Can you describe your use case a bit further - is this just intended to be shorthand for "fetch the latest RC"?

MongoDB version numbers use the first two components to indicate a release series, so perhaps an alias like m 4.0 might be convenient shorthand to download the latest 4.0.x GA release.

I'm not sure it is necessary to have an RC aliased as the default for a major version release, but possibly there could be a parameter to indicate that RCs are allowable. For example: m 4.0 --rc (install the latest 4.0.x GA or RC).

What do you think?

Regards, Stennie

p-mongo commented 6 years ago

You are right, aliasing 4 to 4.0.0-rc5 is not very appropriate. I would also agree with m 3.6 and m 4.0 --rc as valid use cases.

stennie commented 6 years ago

Thanks for the suggestion @p-mongo! I like the convenience of not having to remember the latest revision number available (or installed), so have added some aliases.

With 3.6 as an example:

This doesn't replace any of the previous syntax if you prefer to install a specific release.

Checking for the latest release (as per the first example of m 3.6) does involve fetching a list of available versions and could perhaps be cached or sped up. The m use and m shell incantations only check for previously downloaded versions.

Regards, Stennie

p-mongo commented 6 years ago

Sounds great, thanks!