scripts: add additional regex for dl_cleanup
authorAnsuel Smith <ansuelsmth@gmail.com>
Thu, 31 Mar 2022 19:15:51 +0000 (21:15 +0200)
committerChristian Marangi <ansuelsmth@gmail.com>
Tue, 13 Sep 2022 23:34:43 +0000 (01:34 +0200)
Add additional regex for dl_cleanup script to handle
case with xxx-v1.2a and xxx-v1.2.3a

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
scripts/dl_cleanup.py

index ad1b88c8b9086633ec6c35a89b88c9e30871c401..d22762136afaa305cf69ac3e0d51a479b1f382dc 100755 (executable)
@@ -119,8 +119,10 @@ versionRegex = (
     (re.compile(r"(.+)[-_](\d\d\d\d)-?(\d\d)-?(\d\d)"), parseVer_ymd),  # xxx-YYYY-MM-DD
     (re.compile(r"(.+)[-_]([0-9a-fA-F]{40,40})"), parseVer_GIT),  # xxx-GIT_SHASUM
     (re.compile(r"(.+)[-_](\d+)\.(\d+)\.(\d+)(\w?)"), parseVer_123),  # xxx-1.2.3a
+    (re.compile(r"(.+)[-_]v(\d+)\.(\d+)\.(\d+)(\w?)"), parseVer_123),  # xxx-v1.2.3a
     (re.compile(r"(.+)[-_](\d+)_(\d+)_(\d+)"), parseVer_123),  # xxx-1_2_3
     (re.compile(r"(.+)[-_](\d+)\.(\d+)(\w?)"), parseVer_12),  # xxx-1.2a
+    (re.compile(r"(.+)[-_]v(\d+)\.(\d+)(\w?)"), parseVer_12),  # xxx-v1.2a
     (re.compile(r"(.+)[-_]r?(\d+)"), parseVer_r),  # xxx-r1111
 )