fix: Math the first numbers group as date from the tag #332

This commit is contained in:
Artem Chepurnoy 2024-05-04 13:52:31 +03:00
parent fa4aa722b1
commit 83ac3d43f5
No known key found for this signature in database
GPG Key ID: FAC37D0CF674043E
2 changed files with 2 additions and 2 deletions

View File

@ -10,7 +10,7 @@ args = parser.parse_args()
tag = args.tag tag = args.tag
# A format of the tag is r+yyyyMMdd, we # A format of the tag is r+yyyyMMdd, we
# strip out any non digit symbols here. # 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') date = datetime.strptime(date_str, '%Y%m%d')
# Release date. # Release date.

View File

@ -10,7 +10,7 @@ args = parser.parse_args()
tag = args.tag tag = args.tag
# A format of the tag is r+yyyyMMdd, we # A format of the tag is r+yyyyMMdd, we
# strip out any non digit symbols here. # 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') date = datetime.strptime(date_str, '%Y%m%d')
# Release date name. # Release date name.