Add a `get` set of subcommands
fnichol opened this issue · 0 comments
fnichol commented
As a developer,
I want a uniform way to extract full version strings or partial version coordinates,
So that I can use this information in programs, scripts, automation, etc.
Here's an example sketch of the UX…
Load, parse, validate, and print the version from a file to stdout
:
$ version get file VERSION.txt
Print only the minor version coordinate to stdout
:
$ version get file --minor VERSION.txt
Load, parse, validate, and print the version from ./Cargo.toml
to stdout
:
$ version get cargo
Same as above, but from an explicit path to a Cargo.toml
:
$ version get cargo /path/to/Cargo.toml
Print only the build metadata version coordinate to stdout
:
$ version get cargo --build-metadata
Parse, validate, and print only the patch coordinate from stdin
to stdout
:
$ echo "1.2.3" | versio get stdin --patch
As with the bump
set of subcommands, there would be subcommands for:
cargo
file
stdin