Skip to content
Snippets Groups Projects

WS-1405 CASA version mixup

Merged Daniel Nemergut requested to merge ws1405-casa_matrix_service_fix into 2.8.4-DEVELOPMENT
1 file
+ 3
2
Compare changes
  • Side-by-side
  • Inline
@@ -42,7 +42,7 @@ RELEASE_CASA_REGEX = r"^casa-[0-9\.\-]*(pipeline-)?.*"
DEV_CASA_REGEX = r"^casa-[0-9\.\-]*(pipeline-)?[^tp]"
CASA_VERSION_REGEX = r"[a-zA-Z\-]+([\d]+(\.[\d]+){2}(-[\d]+){0,1}).*"
PIPELINE_VERSION_REGEX = r".*([\d]{4}(\.[\d]+){3}).*"
EL_SUFFIX_REGEX = r"el[0-9]+$"
EL_SUFFIX_REGEX = r"[\.\-]el[0-9]+$"
def casa_version_from_path(path: str) -> str:
@@ -60,7 +60,8 @@ def casa_version_from_path(path: str) -> str:
cv_search = re.search(CASA_VERSION_REGEX, path)
pv_search = re.search(PIPELINE_VERSION_REGEX, path)
if cv_search:
casa_version = cv_search.group(1)
# Replace last '-' in the directory name with '.' to match versions stored in the database
casa_version = '.'.join(cv_search.group(1).rsplit('-', 1))
if pv_search:
# Strip el* from the release name (used to be a thing)
pipeline_version = re.sub(EL_SUFFIX_REGEX, "", pv_search.group(1))
Loading