Buildbot: don't add branch prefix when building release branches
authorBrecht Van Lommel <brechtvanlommel@gmail.com>
Fri, 11 Oct 2019 11:45:16 +0000 (13:45 +0200)
committerBrecht Van Lommel <brechtvanlommel@gmail.com>
Fri, 11 Oct 2019 11:46:24 +0000 (13:46 +0200)
build_files/buildbot/buildbot_utils.py
build_files/buildbot/slave_pack.py

index 6891b91aa1e0d3f7bc22754ea06b0290b3efec22..eded6646671c99e7a2268a3ad0a57d1c3d8271ce 100644 (file)
@@ -20,6 +20,7 @@
 
 import argparse
 import os
+import re
 import subprocess
 import sys
 
@@ -27,6 +28,7 @@ class Builder:
     def __init__(self, name, branch):
         self.name = name
         self.branch = branch
+        self.is_release_branch = re.match("^blender-v(.*)-release$", branch) is not None
 
         # Buildbot runs from build/ directory
         self.blender_dir = os.path.abspath(os.path.join('..', 'blender.git'))
index 9e7a157eb99d9e38b4bb33d7656381af543f29e9..5bef2b8173968d56e08ba1c78ee8d255d0549b23 100644 (file)
@@ -32,8 +32,9 @@ def get_package_name(builder, platform=None):
     package_name = 'blender-' + info.full_version
     if platform:
       package_name += '-' + platform
-    if builder.branch != 'master' and info.is_development_build:
-        package_name = builder.branch + "-" + package_name
+    if not (builder.branch == 'master' or builder.is_release_branch):
+        if info.is_development_build:
+            package_name = builder.branch + "-" + package_name
 
     return package_name
 
@@ -47,6 +48,7 @@ def create_buildbot_upload_zip(builder, package_files):
     try:
         z = zipfile.ZipFile(buildbot_upload_zip, "w", compression=zipfile.ZIP_STORED)
         for filepath, filename in package_files:
+            print("Packaged", filename)
             z.write(filepath, arcname=filename)
         z.close()
     except Exception as ex: