diff options
author | Tim Jenssen <tim.jenssen@qt.io> | 2018-02-22 14:05:38 +0100 |
---|---|---|
committer | Tim Jenssen <tim.jenssen@qt.io> | 2018-02-22 13:26:05 +0000 |
commit | ba9679c83c669d100b657e8cb2f95e8846266773 (patch) | |
tree | 329732c645a4f802f23b496a42aa9bd89a7539c4 /packaging-tools/build_wrapper.py | |
parent | 06599ecb257a75bccce97da5e4245a8f9311173c (diff) |
introduce optional subdir to init_snapshot_dir_and_upload_files
Change-Id: I674cf2c1fff6d7575c50053ca375966411e0cf3b
Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
Diffstat (limited to 'packaging-tools/build_wrapper.py')
-rw-r--r-- | packaging-tools/build_wrapper.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/packaging-tools/build_wrapper.py b/packaging-tools/build_wrapper.py index 2ff7e35ed..f047dfc00 100644 --- a/packaging-tools/build_wrapper.py +++ b/packaging-tools/build_wrapper.py @@ -115,15 +115,17 @@ def sign_mac_executable(file_path, working_dir, abort_on_fail): ########################################### # init snapshot build dir and upload files ########################################### -def init_snapshot_dir_and_upload_files(optionDict, project_name, project_version_or_branch, build_number, file_upload_list): +def init_snapshot_dir_and_upload_files(optionDict, project_name, project_version_or_branch, build_number, file_upload_list, subdir = ''): + if subdir is not "" and subdir[0] is not "/": + subdir = "/" + subdir remote_path_base = optionDict['PACKAGE_STORAGE_SERVER_BASE_DIR'] + '/' + project_name + '/' + project_version_or_branch remote_path_snapshot_dir = remote_path_base + '/' + build_number remote_path_latest_link = remote_path_base + '/' + 'latest' # ensure remote directory exists - create_remote_dirs(optionDict, optionDict['PACKAGE_STORAGE_SERVER_ADDR'], remote_path_snapshot_dir) + create_remote_dirs(optionDict, optionDict['PACKAGE_STORAGE_SERVER_ADDR'], remote_path_snapshot_dir + subdir) # upload files for item in file_upload_list: - cmd_args = [optionDict['SCP_COMMAND'], item, optionDict['PACKAGE_STORAGE_SERVER_ADDR'] + ':' + remote_path_snapshot_dir] + cmd_args = [optionDict['SCP_COMMAND'], item, optionDict['PACKAGE_STORAGE_SERVER_ADDR'] + ':' + remote_path_snapshot_dir + subdir] bldinstallercommon.do_execute_sub_process(cmd_args, optionDict['WORK_DIR']) # update 'latest' symlink update_latest_link(optionDict, remote_path_snapshot_dir, remote_path_latest_link) |