Support building arbitrary branches
authorBrecht Van Lommel <brechtvanlommel@gmail.com>
Fri, 30 Aug 2019 16:11:29 +0000 (18:11 +0200)
committerBrecht Van Lommel <brechtvanlommel@gmail.com>
Tue, 3 Sep 2019 12:12:53 +0000 (14:12 +0200)
master.cfg
master_unpack.py

index 5d79d7aa04cc64832228501d6d9a281ec131113d..d53de5f24e8c829404d0cf0b6ac96da0e3ca9c37 100644 (file)
@@ -6,9 +6,6 @@
 # List of the branches being built automatically overnight
 NIGHT_SCHEDULE_BRANCHES = ["master"]
 
-# List of the branches available for force build
-FORCE_SCHEDULE_BRANCHES = ["master", "experimental-build"]
-
 # Dictionary that the buildmaster pays attention to.
 c = BuildmasterConfig = {}
 
@@ -75,11 +72,17 @@ def schedule_force_build(name):
         builderNames=[name],
         codebases=[forcesched.CodebaseParameter(
                 codebase="blender",
-                branch=forcesched.ChoiceStringParameter(
+                branch=forcesched.StringParameter(
                     name="branch",
-                    choices=FORCE_SCHEDULE_BRANCHES,
+                    label="Branch:",
                     default="master"),
-                # Do not hide revision, can be handy!
+                # Hide revision. We don't want to allow anyone to overwrite the
+                # master build with an older version. Could be added back once we
+                # have authentication.
+                revision=forcesched.FixedParameter(
+                    name="revision",
+                    default="",
+                    hide=True),
                 repository=forcesched.FixedParameter(
                     name="repository",
                     default="",
index 3a25be9009f677eaf53ed1af234441a07a08fb61..9c88219ee88d8fa6d9181cdd9b95a367c16a1cc2 100644 (file)
@@ -122,7 +122,8 @@ if not branch or branch == 'master':
 elif branch == 'experimental-build':
     directory = os.path.join(download_prefix, "experimental")
 else:
-    directory = download_prefix
+    directory = os.path.join(download_prefix, branch)
+    os.makedirs(directory, exist_ok=True)
 
 try:
     filename = os.path.join(directory, packagename)