We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e5faf0b commit de35595Copy full SHA for de35595
unit-tests/test-fw-update.py
@@ -52,9 +52,9 @@ def extract_version_from_filename(file_path):
52
return None
53
54
filename = os.path.basename(file_path)
55
- match = re.search(r'[-_](\d+)[._](\d+)[._](\d+)[._](\d+)', filename)
+ match = re.search(r'_(\d+)_(\d+)_(\d+)_(\d+).(bin|img)', filename)
56
if match:
57
- groups = match.groups()
+ groups = match.groups()[:-1] # exclude the file extension
58
if groups[3] == '0':
59
version_str = ".".join(groups[:3])
60
else:
0 commit comments