Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

monodocs: do not use beta releases when importing projects #4712

Merged
merged 1 commit into from
Jan 10, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading