Browse Source

#712 Fix stable branch pattern

Signed-off-by: Uilian Ries <uilianries@gmail.com>
Uilian Ries 6 năm trước cách đây
mục cha
commit
a8fe05127a
1 tập tin đã thay đổi với 6 bổ sung2 xóa
  1. 6 2
      conan/build.py

+ 6 - 2
conan/build.py

@@ -53,11 +53,15 @@ class BuilderSettings(object):
     def stable_branch_pattern(self):
         """ Only upload the package the branch name is like a tag
         """
-        return os.getenv("CONAN_STABLE_BRANCH_PATTERN", r"\d+\.\d+\.\d+")
+        return os.getenv("CONAN_STABLE_BRANCH_PATTERN", r"v(\d+\.\d+)")
 
     @property
     def version(self):
-        return self.branch if re.match(self.stable_branch_pattern, self.branch) else "latest"
+        regex = re.compile(self.stable_branch_pattern)
+        match = regex.match(self.branch)
+        if match:
+            return match.group(1)
+        return "latest"
 
     @property
     def reference(self):