From ce1bd329fa49f910923bfaa077b59dfae1de61ba Mon Sep 17 00:00:00 2001 From: Tom Hu Date: Tue, 19 Nov 2024 18:09:32 -0500 Subject: [PATCH] fix: update CODECOV_NAME to allow spaces --- dist/codecov.sh | 7 +++++-- scripts/envs | 0 scripts/set_do_upload_args.sh | 5 ++++- scripts/upload.sh | 2 +- 4 files changed, 10 insertions(+), 4 deletions(-) delete mode 100644 scripts/envs diff --git a/dist/codecov.sh b/dist/codecov.sh index f32ee2f..907a3a3 100755 --- a/dist/codecov.sh +++ b/dist/codecov.sh @@ -171,7 +171,10 @@ cc_du_args+=( $(write_existing_args CC_GIT_SERVICE) ) cc_du_args+=( $(write_truthy_args CC_HANDLE_NO_REPORTS_FOUND) ) cc_du_args+=( $(write_existing_args CC_JOB_CODE) ) cc_du_args+=( $(write_truthy_args CC_LEGACY) ) -cc_du_args+=( $(write_existing_args CC_NAME) ) +if [ -n "$CC_NAME" ]; +then + cc_du_args+=( "--name" "$CC_NAME" ) +fi cc_du_args+=( $(write_existing_args CC_NETWORK_FILTER) ) cc_du_args+=( $(write_existing_args CC_NETWORK_PREFIX) ) cc_du_args+=( $(write_existing_args CC_NETWORK_ROOT_FOLDER) ) @@ -232,7 +235,7 @@ if ! ./$cc_filename \ ${cc_cli_args[*]} \ do-upload \ ${token_arg[*]} \ - ${cc_du_args[*]}; + "${cc_du_args[@]}"; then exit_if_error "Failed to upload" fi diff --git a/scripts/envs b/scripts/envs deleted file mode 100644 index e69de29..0000000 diff --git a/scripts/set_do_upload_args.sh b/scripts/set_do_upload_args.sh index c5cb6fb..2e188b1 100755 --- a/scripts/set_do_upload_args.sh +++ b/scripts/set_do_upload_args.sh @@ -46,7 +46,10 @@ codecov_du_args+=( $(write_existing_args CODECOV_GIT_SERVICE) ) codecov_du_args+=( $(write_truthy_args CODECOV_HANDLE_NO_REPORTS_FOUND) ) codecov_du_args+=( $(write_existing_args CODECOV_JOB_CODE) ) codecov_du_args+=( $(write_truthy_args CODECOV_LEGACY) ) -codecov_du_args+=( $(write_existing_args CODECOV_NAME) ) +if [ -n "$CODECOV_NAME" ]; +then + codecov_du_args+=( "--name" "$CODECOV_NAME" ) +fi codecov_du_args+=( $(write_existing_args CODECOV_NETWORK_FILTER) ) codecov_du_args+=( $(write_existing_args CODECOV_NETWORK_PREFIX) ) codecov_du_args+=( $(write_existing_args CODECOV_NETWORK_ROOT_FOLDER) ) diff --git a/scripts/upload.sh b/scripts/upload.sh index 7657be7..675f728 100755 --- a/scripts/upload.sh +++ b/scripts/upload.sh @@ -51,7 +51,7 @@ if ! ./$codecov_filename \ ${codecov_cli_args[*]} \ do-upload \ ${token_arg[*]} \ - ${codecov_du_args[*]}; + "${codecov_du_args[@]}"; then exit_if_error "Failed to upload" fi