Version Manager Library
The Version manager library (VMLib) is a generic library to handle semantic versioning as specified at http://semver.org. In addition to complying with semantic versioning v2.0.0, it adds additional API calls to bump the major, minor and patch versions as well as handle distinct types of releases (development, alpha, beta, release candidate, final as well as a custom type)
VMLib has the following public CLI interface
init <name> - Initializes the version tracker
This creates a new version tracker library for the project named . It initializes the version number to 0.1.0 and the release type to
:developmentand the release number to 0. If the project has already been intialized, then raises VMLibInitError.
bump major - Bumps the major version
This will increment the major version by 1, while simultaneously setting the minor version and patchlevel to 0.
bump minor - Bumps the minor version
This will increment the minor version by 1 and reset the patch level to 0.
bump patch - Bumps the patch level
This will increment the patch level by 1.
bump type - Bumps the prerelease type to the next higher release type
This will bump the prerelease type up to the next higher release type, i.e.,
final. The corresponding release number is also set to 1. If the release type is already
custom, it will raise
This will bump the release number by 1 if the prerelease type is
release candidate. If the release type is
:finalit will raise VMLib::Errors::BumpError. If the release type is
custom, it will take the last field of
relcustomand if numeric, it will bump it, otherwise, it will raise VMLib::Errors::BumpError.
This will set the prerelease information as specified by the user.
This will set the build information as specified by the user.
This takes in an optional format string for printing the version information. If the format string is not specified, it will revert to the default, however, if the format string is
tag, then it will print the tag format.
This command will search for all source files beginning with the string
versionand will update them to match with the primary version number set by the bump routine. It will also generate a Git commit for the changed files.
This command will generate a Git tag with the version specified by the version number file.
VMLib supports the following release types, in order
- release candidate