fix: ignore a release older than the tag

--check-version said pcsx2x6's v0.2.22 was older than its code because
the pin holds release v0.2.20, the latest the project published. A
release that is an ancestor of the declared tag is not a later one.
This commit is contained in:
Abdessamad Derraz committed 2026-10-23 17:26:25 +02:00
1 parent 19f22da75f
commit 01465ecf6b
2 files changed
+22

No files matched your search

+6
View File
@@ -4382,6 +4382,12 @@ def _passed_release(
commit = upstream.tag_commit(repo, version.latest_release, args.cache_dir, args.offline)
if not commit:
return None
if version.tag_commit and version.tag_commit != commit:
# A project can publish a release older than its newest tag:
# pcsx2x6's latest release is v0.2.20, its declared tag v0.2.22.
older = upstream.ancestry(repo, commit, version.tag_commit, args.cache_dir, args.offline)
if older and older[1] == 0:
return None
if commit == pin:
return version.latest_release
relation = upstream.ancestry(repo, commit, pin, args.cache_dir, args.offline)