Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'build_files/buildbot/master_unpack.py')
-rw-r--r--build_files/buildbot/master_unpack.py24
1 files changed, 21 insertions, 3 deletions
diff --git a/build_files/buildbot/master_unpack.py b/build_files/buildbot/master_unpack.py
index 06c11b368b0..ad7c09933c6 100644
--- a/build_files/buildbot/master_unpack.py
+++ b/build_files/buildbot/master_unpack.py
@@ -43,6 +43,7 @@ def get_platform(filename):
# platform out, but there may be some variations, so we fiddle a
# bit to handle current and hopefully future names
filename = strip_extension(filename)
+ filename = strip_extension(filename)
tokens = filename.split("-")
platforms = ('osx', 'mac', 'bsd',
@@ -63,6 +64,22 @@ def get_platform(filename):
return '-'.join(platform_tokens)
+
+def get_branch(filename):
+ tokens = filename.split("-")
+ branch = ""
+
+ for token in tokens:
+ if branch == "":
+ branch = token
+ else:
+ branch = branch + "-" + token
+
+ if token == "blender":
+ return branch
+
+ return ""
+
# get filename
if len(sys.argv) < 2:
sys.stderr.write("Not enough arguments, expecting file to unpack\n")
@@ -88,8 +105,9 @@ if len(z.namelist()) != 1:
package = z.namelist()[0]
packagename = os.path.basename(package)
-# detect platform
+# detect platform and branch
platform = get_platform(packagename)
+branch = get_branch(packagename)
if platform == '':
sys.stderr.write('Failed to detect platform ' +
@@ -113,10 +131,10 @@ except Exception, ex:
sys.stderr.write('Failed to unzip package: %s\n' % str(ex))
sys.exit(1)
-# remove other files from the same platform
+# remove other files from the same platform and branch
try:
for f in os.listdir(directory):
- if platform.lower() in f.lower():
+ if get_platform(f) == platform and get_branch(f) == branch:
if f != packagename:
os.remove(os.path.join(directory, f))
except Exception, ex: