Skip to content

Commit 85af159

Browse files
committed
Update version number parsing to include esp-arduino-libs format
1 parent a0841f1 commit 85af159

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

platform.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -298,14 +298,15 @@ def _parse_version(original_version):
298298
r"^gcc(?P<MAJOR>\d+)_(?P<MINOR>\d+)_(?P<PATCH>\d+)-esp-(?P<EXTRA>.+)$",
299299
r"^esp-(?P<EXTRA>.+)-(?P<MAJOR>\d+)\.(?P<MINOR>\d+)\.?(?P<PATCH>\d+)$",
300300
r"^esp-(?P<MAJOR>\d+)\.(?P<MINOR>\d+)\.(?P<PATCH>\d+)(_(?P<EXTRA>.+))?$",
301+
r"^idf-release_v(?P<MAJOR>\d+)\.(?P<MINOR>\d+)(.(?P<PATCH>\d+))?(-(?P<EXTRA>.+))?$",
301302
)
302303
for pattern in version_patterns:
303304
match = re.search(pattern, original_version)
304305
if match:
305306
result = "%s.%s.%s" % (
306307
match.group("MAJOR"),
307308
match.group("MINOR"),
308-
match.group("PATCH"),
309+
match.group("PATCH") if match.group("PATCH") is not None else "0",
309310
)
310311
if match.group("EXTRA"):
311312
result = result + "+%s" % match.group("EXTRA")

0 commit comments

Comments
 (0)