Release Version Utilities

rcdesign.set_version.get_ver(src_ver: str = 'pyproject.toml')

Get the current version of the project from the specified source file. :param src_ver: The source file from which to read the version. Default is “pyproject.toml”. :type src_ver: str

Returns:

The current version of the project.

Return type:

str

rcdesign.set_version.bump(next_ver: str) str

Bump the version number based on the specified type (major, minor, patch) or return the specified version. :param next_ver: The type of version bump (“major”, “minor”, “patch”) or a specific version string. :type next_ver: str

Returns:

The new version number based on the specified type or the specified version string.

Return type:

str

rcdesign.set_version.set_ver()

Get or set the version of the project based on command line arguments.

If no arguments are provided, it returns the current version. If the first argument is “–bump” followed by “patch”, “minor”, or “major”, it bumps the version accordingly and writes it to the __about__.py file. If the third argument is “–dry-run”, it simulates the version change without writing to the file. :returns: A message indicating the current or new version, or the change made. :rtype: str