Handle patch versions in versioning script (#850)

Update the release automation script so that it can correctly handle
patch version numbers like "10.4.3-LTS-Patch-3".

Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
This commit is contained in:
Gaurav-Aggarwal-AWS 2022-09-29 11:18:37 +05:30 committed by GitHub
parent 856d0e8363
commit a81231139e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -104,7 +104,7 @@ def extract_version_number_from_file(file_path):
match = re.search('\s*\*\s*(Amazon FreeRTOS.*V(.*))', content, re.MULTILINE)
# Is it a kernel file?
if match is None:
match = re.search('\s*\*\s*(FreeRTOS Kernel.*V?([0-9]*\.[0-9]*\.[0-9]*|<DEVELOPMENT BRANCH>))', content, re.MULTILINE)
match = re.search('\s*\*\s*(FreeRTOS Kernel.*V?([0-9]*\.[0-9]*\.[0-9]*( LTS Patch \d*)?|<DEVELOPMENT BRANCH>))', content, re.MULTILINE)
if match is None:
match = re.search('\s*\*\s*(FreeRTOS V?([0-9]*\.[0-9]*|<DEVELOPMENT BRANCH>))', content, re.MULTILINE)
# Is it s FreeRTOS+TCP file?