Преглед изворни кода

makepanda: allow passing in more than 3 digits in version number

rdb пре 6 година
родитељ
комит
2b0a2ea6df
2 измењених фајлова са 2 додато и 2 уклоњено
  1. 1 1
      makepanda/makepackage.py
  2. 1 1
      makepanda/makepanda.py

+ 1 - 1
makepanda/makepackage.py

@@ -1071,7 +1071,7 @@ if __name__ == "__main__":
             PkgDisable(pkg)
             PkgDisable(pkg)
 
 
     # Parse the version.
     # Parse the version.
-    match = re.match(r'^\d+\.\d+\.\d+', options.version)
+    match = re.match(r'^\d+\.\d+(\.\d+)+', options.version)
     if not match:
     if not match:
         exit("version requires three digits")
         exit("version requires three digits")
 
 

+ 1 - 1
makepanda/makepanda.py

@@ -225,7 +225,7 @@ def parseopts(args):
             elif (option=="--arch"): target_arch = value.strip()
             elif (option=="--arch"): target_arch = value.strip()
             elif (option=="--nocolor"): DisableColors()
             elif (option=="--nocolor"): DisableColors()
             elif (option=="--version"):
             elif (option=="--version"):
-                match = re.match(r'^\d+\.\d+\.\d+', value)
+                match = re.match(r'^\d+\.\d+(\.\d+)+', value)
                 if not match:
                 if not match:
                     usage("version requires three digits")
                     usage("version requires three digits")
                 WHLVERSION = value
                 WHLVERSION = value