Skip to content

Commit f7311b6

Browse files
authored
Merge pull request #330 from cta-observatory/longterm_symlink
Consider only files produced with version vX.Y.Z to create the symlink
2 parents 1448702 + fbbc714 commit f7311b6

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/osa/paths.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,8 @@ def get_latest_version_file(longterm_files: List[str]) -> Path:
358358
return max(
359359
longterm_files,
360360
key=lambda path: int(path.parents[1].name.split(".")[1])
361-
if path.parents[1].name.startswith("v")
361+
if path.parents[1].name.startswith("v") and
362+
re.match(r'^\d+\.\d+(\.\d+)?$', path.parents[1].name[1:])
362363
else "",
363364
)
364365

0 commit comments

Comments
 (0)