diff options
Diffstat (limited to 'build_files/buildbot/slave_pack.py')
-rw-r--r-- | build_files/buildbot/slave_pack.py | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/build_files/buildbot/slave_pack.py b/build_files/buildbot/slave_pack.py index faceb8d3a65..8ff7783b6d1 100644 --- a/build_files/buildbot/slave_pack.py +++ b/build_files/buildbot/slave_pack.py @@ -123,8 +123,20 @@ 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, "buildbot_upload.zip") - sys.exit(retcode) + os.rename(result_file, "{}.zip".format(builder)) + # 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.close() + sys.exit(retcode) + except Exception, ex: + sys.stderr.write('Create buildbot_upload.zip failed' + str(ex) + '\n') + sys.exit(1) + # clean release directory if it already exists release_dir = 'release' |