6 from cpt.packager
import ConanMultiPackager
7 from cpt.ci_manager
import CIManager
8 from cpt.printer
import Printer
17 printer = Printer(
None)
18 ci_manager = CIManager(printer)
19 return ci_manager.get_branch()
23 """ Set BehaviorTree as package's owner 25 return os.getenv(
"CONAN_USERNAME",
"BehaviorTree")
29 """ Set BehaviorTree repository to be used on upload. 30 The upload server address could be customized by env var 31 CONAN_UPLOAD. If not defined, the method will check the branch name. 32 Only master or CONAN_STABLE_BRANCH_PATTERN will be accepted. 33 The master branch will be pushed to testing channel, because it does 34 not match the stable pattern. Otherwise it will upload to stable 37 if os.getenv(
"CONAN_UPLOAD",
None)
is not None:
38 return os.getenv(
"CONAN_UPLOAD")
42 return "https://api.bintray.com/conan/BehaviorTree/conan" 48 """ Force to upload when match stable pattern branch 50 return os.getenv(
"CONAN_UPLOAD_ONLY_WHEN_STABLE",
True)
54 """ Only upload the package the branch name is like a tag 56 return os.getenv(
"CONAN_STABLE_BRANCH_PATTERN",
r"\d+\.\d+\.\d+")
64 """ Read project version from branch name to create Conan referece 66 return os.getenv(
"CONAN_REFERENCE",
"BehaviorTree.CPP/{}".format(self.
version))
68 if __name__ ==
"__main__":
70 builder = ConanMultiPackager(
71 reference=settings.reference,
72 username=settings.username,
73 upload=settings.upload,
74 upload_only_when_stable=settings.upload_only_when_stable,
75 stable_branch_pattern=settings.stable_branch_pattern,
76 test_folder=os.path.join(
"conan",
"test_package"))
77 builder.add_common_builds(pure_c=
False)
def stable_branch_pattern(self)
def upload_only_when_stable(self)