Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(release): 0.2.0 add recurse-submodules flag to upload-coverage #48

Merged
merged 1 commit into from
Feb 26, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 12 additions & 11 deletions dist/codecov.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env bash
CC_WRAPPER_VERSION="0.1.0"
CC_WRAPPER_VERSION="0.2.0"
set +u
say() {
echo -e "$1"
Expand Down Expand Up @@ -27,7 +27,7 @@ v_arg() {
echo "$(eval echo \$"CC_$1")"
fi
}
write_truthy_args() {
write_bool_args() {
if [ "$(eval echo \$$1)" = "true" ] || [ "$(eval echo \$$1)" = "1" ];
then
echo "-$(lower $1)"
Expand Down Expand Up @@ -143,8 +143,8 @@ then
cc_cli_args+=( "--codecov-yml-path" )
cc_cli_args+=( "$CC_YML_PATH" )
fi
cc_cli_args+=( $(write_truthy_args CC_DISABLE_TELEM) )
cc_cli_args+=( $(write_truthy_args CC_VERBOSE) )
cc_cli_args+=( $(write_bool_args CC_DISABLE_TELEM) )
cc_cli_args+=( $(write_bool_args CC_VERBOSE) )
if [ -n "$CC_TOKEN_VAR" ];
then
token="$(eval echo \$$CC_TOKEN_VAR)"
Expand Down Expand Up @@ -202,9 +202,10 @@ cc_args+=( $(k_arg GCOV_ARGS) $(v_arg GCOV_ARGS))
cc_args+=( $(k_arg GCOV_EXECUTABLE) $(v_arg GCOV_EXECUTABLE))
cc_args+=( $(k_arg GCOV_IGNORE) $(v_arg GCOV_IGNORE))
cc_args+=( $(k_arg GCOV_INCLUDE) $(v_arg GCOV_INCLUDE))
cc_args+=( $(write_truthy_args CC_HANDLE_NO_REPORTS_FOUND) )
cc_args+=( $(write_bool_args CC_HANDLE_NO_REPORTS_FOUND) )
cc_args+=( $(write_bool_args CC_RECURSE_SUBMODULES) )
cc_args+=( $(k_arg JOB_CODE) $(v_arg JOB_CODE))
cc_args+=( $(write_truthy_args CC_LEGACY) )
cc_args+=( $(write_bool_args CC_LEGACY) )
if [ -n "$CC_NAME" ];
then
cc_args+=( "--name" "$CC_NAME" )
Expand All @@ -223,8 +224,8 @@ cc_args+=( $(k_arg SWIFT_PROJECT) $(v_arg SWIFT_PROJECT))
IFS=$OLDIFS
elif [ "$CC_RUN_CMD" == "empty-upload" ]; then
cc_args=()
cc_args+=( $(write_truthy_args CC_FAIL_ON_ERROR) )
cc_args+=( $(write_truthy_args CC_FORCE) )
cc_args+=( $(write_bool_args CC_FAIL_ON_ERROR) )
cc_args+=( $(write_bool_args CC_FORCE) )
cc_args+=( $(k_arg GIT_SERVICE) $(v_arg GIT_SERVICE))
cc_args+=( $(k_arg SHA) $(v_arg SHA))
cc_args+=( $(k_arg SLUG) $(v_arg SLUG))
Expand All @@ -237,17 +238,17 @@ cc_args+=( $(k_arg SERVICE) $(v_arg SERVICE))
elif [ "$CC_RUN_CMD" == "send-notifications" ]; then
cc_args=()
cc_args+=( $(k_arg SHA) $(v_arg SHA))
cc_args+=( $(write_truthy_args CC_FAIL_ON_ERROR) )
cc_args+=( $(write_bool_args CC_FAIL_ON_ERROR) )
cc_args+=( $(k_arg GIT_SERVICE) $(v_arg GIT_SERVICE))
cc_args+=( $(k_arg SLUG) $(v_arg SLUG))
else
exit_if_error "Invalid run command specified: $CC_RUN_CMD"
exit
fi
unset NODE_OPTIONS
# See https://github.com/codecov/uploader/issues/475
# https://github.com/codecov/uploader/issues/475
say "$g==>$x Running $CC_RUN_CMD"
say " $b$cc_command $(echo "${cc_cli_args[@]}")$CC_RUN_CMD$token_str $(echo "${cc_args[@]}")$x"
say " $b$cc_command $(echo "${cc_cli_args[@]}") $CC_RUN_CMD$token_str $(echo "${cc_args[@]}")$x"
if ! $cc_command \
${cc_cli_args[*]} \
${CC_RUN_CMD} \
Expand Down
1 change: 1 addition & 0 deletions env
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ CC_PARENT_SHA
CC_PLUGINS
CC_PR
CC_PUBLIC_PGP_KEY
CC_RECURSE_SUBMODULES
CC_REPORT_TYPE
CC_RUN_CMD
CC_SERVICE
Expand Down
4 changes: 2 additions & 2 deletions scripts/run_command.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ else
fi

unset NODE_OPTIONS
# See https://github.com/codecov/uploader/issues/475
# https://github.com/codecov/uploader/issues/475

say "$g==>$x Running $CODECOV_RUN_CMD"
say " $b$codecov_command $(echo "${codecov_cli_args[@]}")$CODECOV_RUN_CMD$token_str $(echo "${codecov_args[@]}")$x"
say " $b$codecov_command $(echo "${codecov_cli_args[@]}") $CODECOV_RUN_CMD$token_str $(echo "${codecov_args[@]}")$x"
if ! $codecov_command \
${codecov_cli_args[*]} \
${CODECOV_RUN_CMD} \
Expand Down
4 changes: 2 additions & 2 deletions scripts/set_cli_args.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ then
codecov_cli_args+=( "--codecov-yml-path" )
codecov_cli_args+=( "$CODECOV_YML_PATH" )
fi
codecov_cli_args+=( $(write_truthy_args CODECOV_DISABLE_TELEM) )
codecov_cli_args+=( $(write_truthy_args CODECOV_VERBOSE) )
codecov_cli_args+=( $(write_bool_args CODECOV_DISABLE_TELEM) )
codecov_cli_args+=( $(write_bool_args CODECOV_VERBOSE) )
2 changes: 1 addition & 1 deletion scripts/set_defaults.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ v_arg() {
fi
}

write_truthy_args() {
write_bool_args() {
if [ "$(eval echo \$$1)" = "true" ] || [ "$(eval echo \$$1)" = "1" ];
then
echo "-$(lower $1)"
Expand Down
4 changes: 2 additions & 2 deletions scripts/set_empty_upload_args.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

codecov_args=()

codecov_args+=( $(write_truthy_args CODECOV_FAIL_ON_ERROR) )
codecov_args+=( $(write_truthy_args CODECOV_FORCE) )
codecov_args+=( $(write_bool_args CODECOV_FAIL_ON_ERROR) )
codecov_args+=( $(write_bool_args CODECOV_FORCE) )
codecov_args+=( $(k_arg GIT_SERVICE) $(v_arg GIT_SERVICE))
codecov_args+=( $(k_arg SHA) $(v_arg SHA))
codecov_args+=( $(k_arg SLUG) $(v_arg SLUG))
2 changes: 1 addition & 1 deletion scripts/set_send_notifications_args.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
codecov_args=()

codecov_args+=( $(k_arg SHA) $(v_arg SHA))
codecov_args+=( $(write_truthy_args CODECOV_FAIL_ON_ERROR) )
codecov_args+=( $(write_bool_args CODECOV_FAIL_ON_ERROR) )
codecov_args+=( $(k_arg GIT_SERVICE) $(v_arg GIT_SERVICE))
codecov_args+=( $(k_arg SLUG) $(v_arg SLUG))
5 changes: 3 additions & 2 deletions scripts/set_upload_coverage_args.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,10 @@ codecov_args+=( $(k_arg GCOV_ARGS) $(v_arg GCOV_ARGS))
codecov_args+=( $(k_arg GCOV_EXECUTABLE) $(v_arg GCOV_EXECUTABLE))
codecov_args+=( $(k_arg GCOV_IGNORE) $(v_arg GCOV_IGNORE))
codecov_args+=( $(k_arg GCOV_INCLUDE) $(v_arg GCOV_INCLUDE))
codecov_args+=( $(write_truthy_args CODECOV_HANDLE_NO_REPORTS_FOUND) )
codecov_args+=( $(write_bool_args CODECOV_HANDLE_NO_REPORTS_FOUND) )
codecov_args+=( $(write_bool_args CODECOV_RECURSE_SUBMODULES) )
codecov_args+=( $(k_arg JOB_CODE) $(v_arg JOB_CODE))
codecov_args+=( $(write_truthy_args CODECOV_LEGACY) )
codecov_args+=( $(write_bool_args CODECOV_LEGACY) )
if [ -n "$CODECOV_NAME" ];
then
codecov_args+=( "--name" "$CODECOV_NAME" )
Expand Down
2 changes: 1 addition & 1 deletion scripts/version.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
#!/usr/bin/env bash
CODECOV_WRAPPER_VERSION="0.1.0"
CODECOV_WRAPPER_VERSION="0.2.0"