Skip to content

Commit a1f5353

Browse files
committed
Improve _to_fake_sortable_semver() description
Signed-off-by: Leandro Lucarella <[email protected]>
1 parent f84e5cc commit a1f5353

File tree

1 file changed

+4
-1
lines changed
  • src/frequenz/repo/config/mkdocs

1 file changed

+4
-1
lines changed

src/frequenz/repo/config/mkdocs/mike.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,14 +143,17 @@ def build_mike_version(repo_info: RepoVersionInfo) -> MikeVersionInfo:
143143

144144

145145
def _to_fake_sortable_semver(version: str) -> str:
146-
"""Convert a version string to a semver string.
146+
"""Convert a branch version string to a semver string.
147147
148148
The following transformations are applied:
149149
150150
- `vX.Y` -> `X.Y.0`
151151
- `vX.Y-pre` -> `X.Y.99999`
152152
- `vX.Y-dev` -> `X.Y.999999`
153153
154+
The idea is to convert the version string to a semver string that can be sorted
155+
together with proper semver tags using the semver built-in sorting.
156+
154157
Args:
155158
version: The version string to convert.
156159

0 commit comments

Comments
 (0)