diff options
Diffstat (limited to 'build_files')
-rw-r--r-- | build_files/buildbot/slave_pack.py | 16 | ||||
-rw-r--r-- | build_files/cmake/packaging.cmake | 2 |
2 files changed, 15 insertions, 3 deletions
diff --git a/build_files/buildbot/slave_pack.py b/build_files/buildbot/slave_pack.py index 4e5d77b2a0a..aec7cdca80a 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 0cb13e0fc66..b2b14a5e1da 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 |