From 8a5cd24049b0fb009e159d359407505e05963447 Mon Sep 17 00:00:00 2001 From: Matthew Westphall Date: Mon, 24 Jul 2023 17:06:06 -0500 Subject: [PATCH 1/2] SOFTWARE-5621: update 'update_mashfiles' and 'update_repo' to handle osg-23 name patterns --- bin/update_mashfiles.sh | 2 +- bin/update_repo.sh | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/bin/update_mashfiles.sh b/bin/update_mashfiles.sh index 7f8ce01..224291e 100755 --- a/bin/update_mashfiles.sh +++ b/bin/update_mashfiles.sh @@ -50,7 +50,7 @@ else [[ -e $OSGTAGS.exclude ]] || touch $OSGTAGS.exclude - osg_seriespat='[0-9]+\.[0-9]+(-upcoming)?' + osg_seriespat='([0-9]+\.[0-9]+|[2-9][0-9])(-upcoming|-main)?' osg_repopat='contrib|development|release|rolling|testing|empty' osg_tagpat="osg-($osg_seriespat)-el[5-9]-($osg_repopat)" devops_tagpat='devops-el[7-9]-(itb|production)' diff --git a/bin/update_repo.sh b/bin/update_repo.sh index 4abcccd..bc2dcd0 100755 --- a/bin/update_repo.sh +++ b/bin/update_repo.sh @@ -19,6 +19,8 @@ TAG=$1 case $TAG in osg-3.*-upcoming-*-* ) IFS='-' read osg SERIES upcoming DVER REPO <<< "$TAG" SERIES+=-$upcoming ;; + osg-*-*-*-* ) IFS='-' read osg SERIES branch DVER REPO <<< "$TAG" + SERIES+=-$branch ;; osg-*-*-* ) IFS='-' read osg SERIES DVER REPO <<< "$TAG" ;; devops-*-*) IFS='-' read SERIES DVER REPO <<< "$TAG" ;; * ) usage ;; From b3fd3627954be91b36bff762c19a7e9553347188 Mon Sep 17 00:00:00 2001 From: Matthew Westphall Date: Wed, 26 Jul 2023 17:09:23 -0500 Subject: [PATCH 2/2] update 'update_mirror' and 'new_mashfile' to handle osg-23 name patterns --- bin/new_mashfile.sh | 4 ++-- bin/update_mirror.py | 7 ++++--- bin/update_repo.sh | 2 -- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/bin/new_mashfile.sh b/bin/new_mashfile.sh index fc79c2d..0350c3d 100755 --- a/bin/new_mashfile.sh +++ b/bin/new_mashfile.sh @@ -26,8 +26,8 @@ title () { python -c 'import sys; print sys.argv[1].title()' "$*" ; } TAG=$1 case $TAG in - osg-3.*-upcoming-*-* ) IFS='-' read osg SERIES upcoming DVER REPO <<< "$TAG" - SERIES+=-$upcoming ;; + osg-*-*-*-* ) IFS='-' read osg SERIES branch DVER REPO <<< "$TAG" + SERIES+=-$branch ;; osg-*-*-* ) IFS='-' read osg SERIES DVER REPO <<< "$TAG" ;; devops-*-*) IFS='-' read SERIES DVER REPO <<< "$TAG" ;; * ) usage ;; diff --git a/bin/update_mirror.py b/bin/update_mirror.py index 0770b0f..a83a11a 100755 --- a/bin/update_mirror.py +++ b/bin/update_mirror.py @@ -9,6 +9,7 @@ import socket import fcntl import errno +import re def log(log): print("[%s]"%sys.argv[0], time.strftime("%a %m/%d/%y %H:%M:%S %Z: ", time.localtime()), log) @@ -58,9 +59,9 @@ def lock(path): hostname="repo-itb.opensciencegrid.org" def tagsplit(tag): - if 'upcoming' in tag and tag.startswith("osg-3."): - series,_,dver,repo = tag.split('-')[-4:] - series += "-upcoming" + if re.match(r'osg-[0-9.]*-[a-z]*-el[0-9]+-[a-z]*', tag): + series,branch,dver,repo = tag.split('-')[-4:] + series += "-" + branch else: series,dver,repo = tag.split('-')[-3:] return series,dver,repo diff --git a/bin/update_repo.sh b/bin/update_repo.sh index bc2dcd0..23b2ab8 100755 --- a/bin/update_repo.sh +++ b/bin/update_repo.sh @@ -17,8 +17,6 @@ usage () { TAG=$1 case $TAG in - osg-3.*-upcoming-*-* ) IFS='-' read osg SERIES upcoming DVER REPO <<< "$TAG" - SERIES+=-$upcoming ;; osg-*-*-*-* ) IFS='-' read osg SERIES branch DVER REPO <<< "$TAG" SERIES+=-$branch ;; osg-*-*-* ) IFS='-' read osg SERIES DVER REPO <<< "$TAG" ;;