Skip to content

Commit

Permalink
update 'update_mirror' and 'new_mashfile' to handle osg-23 name patterns
Browse files Browse the repository at this point in the history
  • Loading branch information
mwestphall committed Jul 26, 2023
1 parent e859336 commit b3fd362
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
4 changes: 2 additions & 2 deletions bin/new_mashfile.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 ;;
Expand Down
7 changes: 4 additions & 3 deletions bin/update_mirror.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand Down
2 changes: 0 additions & 2 deletions bin/update_repo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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" ;;
Expand Down

0 comments on commit b3fd362

Please sign in to comment.