Skip to content

Commit 2e23f27

Browse files
committed
Update version number parsing to include esp-arduino-libs format
1 parent 16d9ba7 commit 2e23f27

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

platform.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,14 +305,15 @@ def _parse_version(original_version):
305305
r"^gcc(?P<MAJOR>\d+)_(?P<MINOR>\d+)_(?P<PATCH>\d+)-esp-(?P<EXTRA>.+)$",
306306
r"^esp-(?P<EXTRA>.+)-(?P<MAJOR>\d+)\.(?P<MINOR>\d+)\.?(?P<PATCH>\d+)$",
307307
r"^esp-(?P<MAJOR>\d+)\.(?P<MINOR>\d+)\.(?P<PATCH>\d+)(_(?P<EXTRA>.+))?$",
308+
r"^idf-release_v(?P<MAJOR>\d+)\.(?P<MINOR>\d+)(.(?P<PATCH>\d+))?(-(?P<EXTRA>.+))?$",
308309
)
309310
for pattern in version_patterns:
310311
match = re.search(pattern, original_version)
311312
if match:
312313
result = "%s.%s.%s" % (
313314
match.group("MAJOR"),
314315
match.group("MINOR"),
315-
match.group("PATCH"),
316+
match.group("PATCH") if match.group("PATCH") is not None else "0",
316317
)
317318
if match.group("EXTRA"):
318319
result = result + "+%s" % match.group("EXTRA")

0 commit comments

Comments
 (0)