Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
SKip old versions.
Browse files Browse the repository at this point in the history
  • Loading branch information
clokep committed Nov 28, 2023
1 parent 63bb213 commit 8af8160
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions scripts-dev/schema_versions.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,11 @@
)


# Skip versions of Synapse < v1.0, they're old and essentially not
# compatible with today's federation.
OLDEST_SHOWN_VERSION = version.parse("v1.0")


def get_schema_versions(tag: git.Tag) -> Tuple[Optional[int], Optional[int]]:
"""Get the schema and schema compat versions for a tag."""
schema_version = None
Expand Down Expand Up @@ -105,6 +110,10 @@ def get_tags(repo: git.Repo) -> Iterator[git.Tag]:
if tag_version.is_prerelease or tag_version.is_postrelease or tag_version.local:
continue

# Skip old versions.
if tag_version < OLDEST_SHOWN_VERSION:
continue

tags.append((tag_version, tag))

# Sort based on the version number (not lexically).
Expand Down

0 comments on commit 8af8160

Please sign in to comment.