[Bf-blender-cvs] [e96e452] gooseberry: Gooseberry: Fixes for buildbot ported from master

Sergey Sharybin noreply at git.blender.org
Mon Jul 27 14:43:02 CEST 2015


Commit: e96e4526dded03874d553f9d9a6fdc87408b69fd
Author: Sergey Sharybin
Date:   Mon Jul 27 14:41:46 2015 +0200
Branches: gooseberry
https://developer.blender.org/rBe96e4526dded03874d553f9d9a6fdc87408b69fd

Gooseberry: Fixes for buildbot ported from master

Cherry-picking the changes because at this point it becomes quite
tricky to merge master into gooseberry and it's maybe not something
we really want to keep this branch being able to fully re-render the
movie.

===================================================================

M	build_files/buildbot/slave_pack.py
M	build_files/cmake/packaging.cmake

===================================================================

diff --git a/build_files/buildbot/slave_pack.py b/build_files/buildbot/slave_pack.py
index 4e5d77b..aec7cdc 100644
--- a/build_files/buildbot/slave_pack.py
+++ b/build_files/buildbot/slave_pack.py
@@ -123,14 +123,26 @@ else:
             os.remove(f)
         retcode = subprocess.call(['cpack', '-G', 'ZIP'])
         result_file = [f for f in os.listdir('.') if os.path.isfile(f) and f.endswith('.zip')][0]
-        os.rename(result_file, "{}.zip".format(builder))
+
+        # TODO(sergey): Such magic usually happens in SCon's packaging bu we don't have it
+        # in the CMake yet. For until then we do some magic here.
+        tokens = result_file.split('-')
+        blender_version = tokens[1].split('.')
+        blender_full_version = '.'.join(blender_version[0:2])
+        git_hash = tokens[2].split('.')[1]
+        platform = builder.split('_')[0]
+        builderified_name = 'blender-{}-{}-{}'.format(blender_full_version, git_hash, platform)
+        if branch != '':
+            builderified_name = branch + "-" + builderified_name
+
+        os.rename(result_file, "{}.zip".format(builderified_name))
         # create zip file
         try:
             upload_zip = "buildbot_upload.zip"
             if os.path.exists(upload_zip):
                 os.remove(upload_zip)
             z = zipfile.ZipFile(upload_zip, "w", compression=zipfile.ZIP_STORED)
-            z.write("{}.zip".format(builder))
+            z.write("{}.zip".format(builderified_name))
             z.close()
             sys.exit(retcode)
         except Exception as ex:
diff --git a/build_files/cmake/packaging.cmake b/build_files/cmake/packaging.cmake
index 0cb13e0..b2b14a5 100644
--- a/build_files/cmake/packaging.cmake
+++ b/build_files/cmake/packaging.cmake
@@ -24,7 +24,7 @@ if(EXISTS ${CMAKE_SOURCE_DIR}/.git/)
 	include(FindGit)
 	if(GIT_FOUND)
 		message(STATUS "-- Found Git: ${GIT_EXECUTABLE}")
-		execute_process(COMMAND git rev-parse --short @{u}
+		execute_process(COMMAND git rev-parse --short HEAD
 		                WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
 		                OUTPUT_VARIABLE MY_WC_HASH
 		                OUTPUT_STRIP_TRAILING_WHITESPACE




More information about the Bf-blender-cvs mailing list