Skip to content

Commit

Permalink
monodocs: do not use beta releases when importing projects
Browse files Browse the repository at this point in the history
Signed-off-by: Niels Bantilan <[email protected]>
  • Loading branch information
cosmicBboy committed Jan 10, 2024
1 parent ac42562 commit 1b69c35
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion docs/_ext/import_projects.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ class Project:
```
"""

VERSION_PATTERN = r"^v[0-9]+.[0-9]+.[0-9]+$"


class ListTableToc(SphinxDirective):
"""Custom directive to convert list-table into both list-table and toctree."""
Expand Down Expand Up @@ -146,7 +148,10 @@ def import_projects(app: Sphinx, config: Config):
dest_docs_dir = srcdir / project.dest

if repo:
tags = sorted(repo.tags, key=lambda t: t.commit.committed_datetime)
tags = sorted(
[t for t in repo.tags if re.match(VERSION_PATTERN, t.name)],
key=lambda t: t.commit.committed_datetime
)
if not tags:
# If tags don't exist just use the current commit. This occurs
# when the git repo is a shallow clone.
Expand Down

0 comments on commit 1b69c35

Please sign in to comment.