Skip to content

Commit

Permalink
sanity_checks: accept dash in packages' version strings
Browse files Browse the repository at this point in the history
Projects may use dashes ('-') in their version strings (for example,
taocpp-json use "-beta.N" for years) but it prevents accepting such
projecs in the wrapdb database.

As the string is splitted with rsplit(1), such version strings should
not cause a problem.
  • Loading branch information
rherilier committed Sep 19, 2024
1 parent 9ed2264 commit b07d1cf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/sanity_checks.py
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ def test_releases(self):
t = f'{name}_{v}'
ver, rev = v.rsplit('-', 1)
with self.subTest(step='valid release name'):
self.assertTrue(re.fullmatch('[a-z0-9._]+', ver))
self.assertTrue(re.fullmatch('[a-z0-9._-]+', ver))
self.assertTrue(re.fullmatch('[0-9]+', rev))
if i == 0:
with self.subTest(step='check_source_url'):
Expand Down

0 comments on commit b07d1cf

Please sign in to comment.