Skip to content

Commit

Permalink
arg_parser: Fixed regex for new GenAI archives
Browse files Browse the repository at this point in the history
  • Loading branch information
artanokhov committed Aug 26, 2024
1 parent ed11740 commit 9d1eb46
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions utils/arg_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -497,7 +497,7 @@ def parse_args(name: str, description: str): # noqa
parser.error('Insufficient arguments. Provide --package_url '
'or --distribution (with optional --product_version) arguments')
if args.mode != 'gen_dockerfile' or args.rhel_platform == 'autobuild':
dev_version = re.search(r'^\d{4}\.\d\.\d\.dev\d{8}$', args.product_version)
dev_version = re.search(r'^\d{4}\.\d\.\d\.(?:d\.)?dev\d{8}$', args.product_version)
if dev_version:
args.product_version = dev_version.group()
else:
Expand All @@ -513,7 +513,7 @@ def parse_args(name: str, description: str): # noqa
f'and {args.distribution} distribution. Please specify --package_url directly.')

if args.package_url and not args.build_id:
dev_version = re.search(r'p_(\d{4}\.\d\.\d\.dev\d{8})', args.package_url)
dev_version = re.search(r'_(\d{4}\.\d\.\d\.(?:d\.)?dev\d{8})', args.package_url)
if dev_version:
# save product version and build version as YYYY.U.V.devYYYYMMDD
args.product_version = dev_version.group(1)
Expand Down

0 comments on commit 9d1eb46

Please sign in to comment.