From 83ac3d43f577bf107cdb70c150e644b8630bfe34 Mon Sep 17 00:00:00 2001 From: Artem Chepurnoy Date: Sat, 4 May 2024 13:52:31 +0300 Subject: [PATCH] fix: Math the first numbers group as date from the tag #332 --- .github/convert_tag_date.py | 2 +- .github/convert_tag_release_name.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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.