Open
Description
It would be nice to have a set_version example in the documentation that promotes semver tags. This also matches version convention supported by CMake:
project(<PROJECT-NAME>
[VERSION <major>[.<minor>[.<patch>[.<tweak>]]]]
def set_version(self):
""" Set version from last Git tag v<major>.<minor>.<patch>.
Extra commits on top of the tag add .<tweak> number for the final version.
"""
git = tools.Git(folder=self.recipe_folder)
tag = git.run('describe --match v*')
m_release = re.search(r'v(\d+.\d+.\d+)', tag)
m_develop = re.search(r'-(\d+)', tag)
self.version = m_release.group(1)
if m_develop:
self.version += '.' + m_develop.group(1)
- I've read the CONTRIBUTING guide.
Metadata
Metadata
Assignees
Labels
No labels