feat: watch the release page of off-forge profiles

About forty profiles describe projects published outside any forge (Altirra, ePSXe, DraStic, mednafen, xroar). profile_sync skipped them as an unsupported host and check_freshness reported the same UNKNOWN line every run, so a new release adding a firmware went unseen. A profile can now name the page announcing its releases and a pattern for the version: --check-version reads it, and check_freshness --profiles calls the profile stale when the page announces another version than core_version.
This commit is contained in:
Abdessamad Derraz committed 2026-10-20 04:28:27 +02:00
1 parent d43aa5354c
commit 282f8d5d0a
7 files changed
+102

No files matched your search

+15
View File
@@ -4253,5 +4253,20 @@ class StrictRefusesAnUncheckableProfile(unittest.TestCase):
self.assertFalse(report("no source_ref").uncheckable())
class AnOffForgeProfileWatchesItsReleasePage(unittest.TestCase):
"""Profiles of projects outside any forge were skipped as an unsupported
host, and a new release of Altirra or mednafen went unseen."""
def test_the_page_version_is_read(self):
from unittest import mock
profile = {"emulator": "Altirra", "core_version": "4.40", "version_source": {
"url": "https://example.test/altirra", "pattern": r"Altirra (\d+\.\d+) released",
}}
with mock.patch.object(profile_sync.upstream, "fetch_page",
return_value="<p>Altirra 4.50 released</p>"):
self.assertEqual(profile_sync.page_version(profile, "cache", False), "4.50")
if __name__ == "__main__":
unittest.main()