diff --git a/.github/convert_tag_date.py b/.github/convert_tag_date.py index 99ba803b..fe6bdaf8 100644 --- a/.github/convert_tag_date.py +++ b/.github/convert_tag_date.py @@ -10,7 +10,7 @@ args = parser.parse_args() tag = args.tag # A format of the tag is r+yyyyMMdd, we # strip out any non digit symbols here. -date_str = re.sub(r'[^\d]', '', tag) +date_str = re.match(r'[^\d]*(\d+).*', tag).group(1) date = datetime.strptime(date_str, '%Y%m%d') # Release date. diff --git a/.github/convert_tag_release_name.py b/.github/convert_tag_release_name.py index 12ecc3f0..595a920e 100644 --- a/.github/convert_tag_release_name.py +++ b/.github/convert_tag_release_name.py @@ -10,7 +10,7 @@ args = parser.parse_args() tag = args.tag # A format of the tag is r+yyyyMMdd, we # strip out any non digit symbols here. -date_str = re.sub(r'[^\d]', '', tag) +date_str = re.match(r'[^\d]*(\d+).*', tag).group(1) date = datetime.strptime(date_str, '%Y%m%d') # Release date name.