Compare commits

..

1 Commits

Author SHA1 Message Date
codecov-releaser
46d471da76 chore(release): wrapper-0.2.0 2025-02-26 19:27:18 +00:00
8 changed files with 91 additions and 158 deletions

View File

@@ -41,7 +41,7 @@ jobs:
# Initializes the CodeQL tools for scanning. # Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL - name: Initialize CodeQL
uses: github/codeql-action/init@v3.28.17 uses: github/codeql-action/init@v3.28.10
with: with:
languages: ${{ matrix.language }} languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file. # If you wish to specify custom queries, you can do so here or in a config file.
@@ -52,7 +52,7 @@ jobs:
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java). # Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below) # If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild - name: Autobuild
uses: github/codeql-action/autobuild@v3.28.17 uses: github/codeql-action/autobuild@v3.28.10
# Command-line programs to run using the OS shell. # Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl # 📚 https://git.io/JvXDl
@@ -66,4 +66,4 @@ jobs:
# make release # make release
- name: Perform CodeQL Analysis - name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3.28.17 uses: github/codeql-action/analyze@v3.28.10

View File

@@ -49,7 +49,7 @@ jobs:
# Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF # Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
# format to the repository Actions tab. # format to the repository Actions tab.
- name: "Upload artifact" - name: "Upload artifact"
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 # v4.6.1
with: with:
name: SARIF file name: SARIF file
path: results.sarif path: results.sarif
@@ -57,6 +57,6 @@ jobs:
# Upload the results to GitHub's code scanning dashboard. # Upload the results to GitHub's code scanning dashboard.
- name: "Upload to code-scanning" - name: "Upload to code-scanning"
uses: github/codeql-action/upload-sarif@v3.28.17 # v1.0.26 uses: github/codeql-action/upload-sarif@v3.28.10 # v1.0.26
with: with:
sarif_file: results.sarif sarif_file: results.sarif

View File

@@ -1,54 +1,3 @@
## v5.4.3
### What's Changed
* build(deps): bump github/codeql-action from 3.28.13 to 3.28.17 by @app/dependabot in https://github.com/codecov/codecov-action/pull/1822
* fix: OIDC on forks by @joseph-sentry in https://github.com/codecov/codecov-action/pull/1823
**Full Changelog**: https://github.com/codecov/codecov-action/compare/v5.4.2..v5.4.3
## v5.4.2
### What's Changed
**Full Changelog**: https://github.com/codecov/codecov-action/compare/v5.4.1..v5.4.2
## v5.4.1
### What's Changed
* fix: use the github core methods by @thomasrockhu-codecov in https://github.com/codecov/codecov-action/pull/1807
* build(deps): bump github/codeql-action from 3.28.12 to 3.28.13 by @app/dependabot in https://github.com/codecov/codecov-action/pull/1803
* build(deps): bump github/codeql-action from 3.28.11 to 3.28.12 by @app/dependabot in https://github.com/codecov/codecov-action/pull/1797
* build(deps): bump actions/upload-artifact from 4.6.1 to 4.6.2 by @app/dependabot in https://github.com/codecov/codecov-action/pull/1798
* chore(release): wrapper -0.2.1 by @app/codecov-releaser-app in https://github.com/codecov/codecov-action/pull/1788
* build(deps): bump github/codeql-action from 3.28.10 to 3.28.11 by @app/dependabot in https://github.com/codecov/codecov-action/pull/1786
**Full Changelog**: https://github.com/codecov/codecov-action/compare/v5.4.0..v5.4.1
## v5.4.0
### What's Changed
* update wrapper submodule to 0.2.0, add recurse_submodules arg by @matt-codecov in https://github.com/codecov/codecov-action/pull/1780
* build(deps): bump actions/upload-artifact from 4.6.0 to 4.6.1 by @app/dependabot in https://github.com/codecov/codecov-action/pull/1775
* build(deps): bump ossf/scorecard-action from 2.4.0 to 2.4.1 by @app/dependabot in https://github.com/codecov/codecov-action/pull/1776
* build(deps): bump github/codeql-action from 3.28.9 to 3.28.10 by @app/dependabot in https://github.com/codecov/codecov-action/pull/1777
* Clarify in README that `use_pypi` bypasses integrity checks too by @webknjaz in https://github.com/codecov/codecov-action/pull/1773
* Fix use of safe.directory inside containers by @Flamefire in https://github.com/codecov/codecov-action/pull/1768
* Fix description for report_type input by @craigscott-crascit in https://github.com/codecov/codecov-action/pull/1770
* build(deps): bump github/codeql-action from 3.28.8 to 3.28.9 by @app/dependabot in https://github.com/codecov/codecov-action/pull/1765
* Fix a typo in the example by @miranska in https://github.com/codecov/codecov-action/pull/1758
* build(deps): bump github/codeql-action from 3.28.5 to 3.28.8 by @app/dependabot in https://github.com/codecov/codecov-action/pull/1757
* build(deps): bump github/codeql-action from 3.28.1 to 3.28.5 by @app/dependabot in https://github.com/codecov/codecov-action/pull/1753
**Full Changelog**: https://github.com/codecov/codecov-action/compare/v5.3.1..v5.4.0
## v5.3.1 ## v5.3.1
### What's Changed ### What's Changed

View File

@@ -141,7 +141,6 @@ Codecov's Action supports inputs from the user. These inputs, along with their d
| `override_commit` | Commit SHA (with 40 chars) | Optional | `override_commit` | Commit SHA (with 40 chars) | Optional
| `override_pr` | Specify the pull request number manually. Used to override pre-existing CI environment variables. | Optional | `override_pr` | Specify the pull request number manually. Used to override pre-existing CI environment variables. | Optional
| `plugins` | Comma-separated list of plugins to run. Specify `noop` to turn off all plugins | Optional | `plugins` | Comma-separated list of plugins to run. Specify `noop` to turn off all plugins | Optional
| `recurse_submodules` | Whether to enumerate files inside of submodules for path-fixing purposes. Off by default. | Optional
| `report_code` | The code of the report if using local upload. If unsure, leave unset. Read more here https://docs.codecov.com/docs/the-codecov-cli#how-to-use-local-upload | Optional | `report_code` | The code of the report if using local upload. If unsure, leave unset. Read more here https://docs.codecov.com/docs/the-codecov-cli#how-to-use-local-upload | Optional
| `report_type` | The type of file to upload, coverage by default. Possible values are "test_results", "coverage". | Optional | `report_type` | The type of file to upload, coverage by default. Possible values are "test_results", "coverage". | Optional
| `root_dir` | Root folder from which to consider paths on the network section. Defaults to current working directory. | Optional | `root_dir` | Root folder from which to consider paths on the network section. Defaults to current working directory. | Optional

View File

@@ -112,9 +112,6 @@ inputs:
plugins: plugins:
description: 'Comma-separated list of plugins to run. Specify `noop` to turn off all plugins' description: 'Comma-separated list of plugins to run. Specify `noop` to turn off all plugins'
required: false required: false
recurse_submodules:
description: 'Whether to enumerate files inside of submodules for path-fixing purposes. Off by default.'
default: 'false'
report_code: report_code:
description: 'The code of the report if using local upload. If unsure, leave default. Read more here https://docs.codecov.com/docs/the-codecov-cli#how-to-use-local-upload' description: 'The code of the report if using local upload. If unsure, leave default. Read more here https://docs.codecov.com/docs/the-codecov-cli#how-to-use-local-upload'
required: false required: false
@@ -202,25 +199,16 @@ runs:
GITHUB_EVENT_PULL_REQUEST_HEAD_REPO_FULL_NAME: ${{ github.event.pull_request.head.repo.full_name }} GITHUB_EVENT_PULL_REQUEST_HEAD_REPO_FULL_NAME: ${{ github.event.pull_request.head.repo.full_name }}
GITHUB_REPOSITORY: ${{ github.repository }} GITHUB_REPOSITORY: ${{ github.repository }}
- name: Get OIDC token
uses: actions/github-script@v7
id: oidc
with:
script: |
if (process.env.CC_USE_OIDC === 'true' && process.env.CC_FORK != 'true') {
const id_token = await core.getIDToken(process.env.CC_OIDC_AUDIENCE)
return id_token
}
env:
CC_OIDC_AUDIENCE: ${{ inputs.url || 'https://codecov.io' }}
CC_USE_OIDC: ${{ inputs.use_oidc }}
- name: Get and set token - name: Get and set token
shell: bash shell: bash
run: | run: |
if [ "${{ inputs.use_oidc }}" == 'true' ] && [ "$CC_FORK" != 'true' ]; if [ "${{ inputs.use_oidc }}" == 'true' ] && [ "$CC_FORK" != 'true' ];
then then
echo "CC_TOKEN=$CC_OIDC_TOKEN" >> "$GITHUB_ENV" # {"count":1984,"value":"***"}
echo -e "\033[0;32m==>\033[0m Requesting OIDC token from '$ACTIONS_ID_TOKEN_REQUEST_URL'"
CC_TOKEN=$(curl -H "Authorization: bearer $ACTIONS_ID_TOKEN_REQUEST_TOKEN" "$ACTIONS_ID_TOKEN_REQUEST_URL&audience=$CC_OIDC_AUDIENCE" | cut -d\" -f6)
echo "CC_TOKEN=$CC_TOKEN" >> "$GITHUB_ENV"
elif [ -n "${{ env.CODECOV_TOKEN }}" ]; elif [ -n "${{ env.CODECOV_TOKEN }}" ];
then then
echo -e "\033[0;32m==>\033[0m Token set from env" echo -e "\033[0;32m==>\033[0m Token set from env"
@@ -234,7 +222,6 @@ runs:
fi fi
fi fi
env: env:
CC_OIDC_TOKEN: ${{ steps.oidc.outputs.result }}
CC_OIDC_AUDIENCE: ${{ inputs.url || 'https://codecov.io' }} CC_OIDC_AUDIENCE: ${{ inputs.url || 'https://codecov.io' }}
- name: Override branch for forks - name: Override branch for forks
@@ -313,7 +300,6 @@ runs:
CC_OS: ${{ inputs.os }} CC_OS: ${{ inputs.os }}
CC_PARENT_SHA: ${{ inputs.commit_parent }} CC_PARENT_SHA: ${{ inputs.commit_parent }}
CC_PLUGINS: ${{ inputs.plugins }} CC_PLUGINS: ${{ inputs.plugins }}
CC_RECURSE_SUBMODULES: ${{ inputs.recurse_submodules }}
CC_REPORT_TYPE: ${{ inputs.report_type }} CC_REPORT_TYPE: ${{ inputs.report_type }}
CC_RUN_CMD: ${{ inputs.run_command }} CC_RUN_CMD: ${{ inputs.run_command }}
CC_SERVICE: ${{ inputs.git_service }} CC_SERVICE: ${{ inputs.git_service }}

161
dist/codecov.sh vendored
View File

@@ -1,5 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
CC_WRAPPER_VERSION="0.2.1" CC_WRAPPER_VERSION="0.1.0"
set +u set +u
say() { say() {
echo -e "$1" echo -e "$1"
@@ -27,7 +27,7 @@ v_arg() {
echo "$(eval echo \$"CC_$1")" echo "$(eval echo \$"CC_$1")"
fi fi
} }
write_bool_args() { write_truthy_args() {
if [ "$(eval echo \$$1)" = "true" ] || [ "$(eval echo \$$1)" = "1" ]; if [ "$(eval echo \$$1)" = "true" ] || [ "$(eval echo \$$1)" = "1" ];
then then
echo "-$(lower $1)" echo "-$(lower $1)"
@@ -52,8 +52,8 @@ if [ -n "$CC_BINARY" ];
then then
if [ -f "$CC_BINARY" ]; if [ -f "$CC_BINARY" ];
then then
c_filename=$CC_BINARY cc_filename=$CC_BINARY
c_command=$CC_BINARY cc_command=$CC_BINARY
else else
exit_if_error "Could not find binary file $CC_BINARY" exit_if_error "Could not find binary file $CC_BINARY"
fi fi
@@ -63,7 +63,7 @@ then
exit_if_error "Could not install via pypi." exit_if_error "Could not install via pypi."
exit exit
fi fi
c_command="codecovcli" cc_command="codecovcli"
else else
if [ -n "$CC_OS" ]; if [ -n "$CC_OS" ];
then then
@@ -79,17 +79,17 @@ else
[[ $(arch) == "aarch64" && $family == "linux" ]] && CC_OS+="-arm64" [[ $(arch) == "aarch64" && $family == "linux" ]] && CC_OS+="-arm64"
say "$g==>$x Detected $b${CC_OS}$x" say "$g==>$x Detected $b${CC_OS}$x"
fi fi
c_filename="codecov" cc_filename="codecov"
[[ $CC_OS == "windows" ]] && c_filename+=".exe" [[ $CC_OS == "windows" ]] && cc_filename+=".exe"
c_command="./$c_filename" cc_command="./$cc_filename"
[[ $CC_OS == "macos" ]] && \ [[ $CC_OS == "macos" ]] && \
! command -v gpg 2>&1 >/dev/null && \ ! command -v gpg 2>&1 >/dev/null && \
HOMEBREW_NO_AUTO_UPDATE=1 brew install gpg HOMEBREW_NO_AUTO_UPDATE=1 brew install gpg
c_url="https://cli.codecov.io" cc_url="https://cli.codecov.io"
c_url="$c_url/${CC_VERSION}" cc_url="$cc_url/${CC_VERSION}"
c_url="$c_url/${CC_OS}/${c_filename}" cc_url="$cc_url/${CC_OS}/${cc_filename}"
say "$g ->$x Downloading $b${c_url}$x" say "$g ->$x Downloading $b${cc_url}$x"
curl -O --retry 5 --retry-delay 2 "$c_url" curl -O --retry 5 --retry-delay 2 "$cc_url"
say "$g==>$x Finishing downloading $b${CC_OS}:${CC_VERSION}$x" say "$g==>$x Finishing downloading $b${CC_OS}:${CC_VERSION}$x"
version_url="https://cli.codecov.io/api/${CC_OS}/${CC_VERSION}" version_url="https://cli.codecov.io/api/${CC_OS}/${CC_VERSION}"
version=$(curl -s "$version_url" -H "Accept:application/json" | tr \{ '\n' | tr , '\n' | tr \} '\n' | grep "\"version\"" | awk -F'"' '{print $4}' | tail -1) version=$(curl -s "$version_url" -H "Accept:application/json" | tr \{ '\n' | tr , '\n' | tr \} '\n' | grep "\"version\"" | awk -F'"' '{print $4}' | tail -1)
@@ -107,44 +107,44 @@ CC_PUBLIC_PGP_KEY=$(curl -s https://keybase.io/codecovsecurity/pgp_keys.asc)
say "$g==>$x Verifying GPG signature integrity" say "$g==>$x Verifying GPG signature integrity"
sha_url="https://cli.codecov.io" sha_url="https://cli.codecov.io"
sha_url="${sha_url}/${CC_VERSION}/${CC_OS}" sha_url="${sha_url}/${CC_VERSION}/${CC_OS}"
sha_url="${sha_url}/${c_filename}.SHA256SUM" sha_url="${sha_url}/${cc_filename}.SHA256SUM"
say "$g ->$x Downloading $b${sha_url}$x" say "$g ->$x Downloading $b${sha_url}$x"
say "$g ->$x Downloading $b${sha_url}.sig$x" say "$g ->$x Downloading $b${sha_url}.sig$x"
say " " say " "
curl -Os --retry 5 --retry-delay 2 --connect-timeout 2 "$sha_url" curl -Os --retry 5 --retry-delay 2 --connect-timeout 2 "$sha_url"
curl -Os --retry 5 --retry-delay 2 --connect-timeout 2 "${sha_url}.sig" curl -Os --retry 5 --retry-delay 2 --connect-timeout 2 "${sha_url}.sig"
if ! gpg --verify "${c_filename}.SHA256SUM.sig" "${c_filename}.SHA256SUM"; if ! gpg --verify "${cc_filename}.SHA256SUM.sig" "${cc_filename}.SHA256SUM";
then then
exit_if_error "Could not verify signature. Please contact Codecov if problem continues" exit_if_error "Could not verify signature. Please contact Codecov if problem continues"
fi fi
if ! (shasum -a 256 -c "${c_filename}.SHA256SUM" 2>/dev/null || \ if ! (shasum -a 256 -c "${cc_filename}.SHA256SUM" 2>/dev/null || \
sha256sum -c "${c_filename}.SHA256SUM"); sha256sum -c "${cc_filename}.SHA256SUM");
then then
exit_if_error "Could not verify SHASUM. Please contact Codecov if problem continues" exit_if_error "Could not verify SHASUM. Please contact Codecov if problem continues"
fi fi
say "$g==>$x CLI integrity verified" say "$g==>$x CLI integrity verified"
say say
chmod +x "$c_command" chmod +x "$cc_command"
fi fi
if [ -n "$CC_BINARY_LOCATION" ]; if [ -n "$CC_BINARY_LOCATION" ];
then then
mkdir -p "$CC_BINARY_LOCATION" && mv "$c_filename" $_ mkdir -p "$CC_BINARY_LOCATION" && mv "$cc_filename" $_
say "$g==>$x Codecov binary moved to ${CC_BINARY_LOCATION}" say "$g==>$x Codecov binary moved to ${CC_BINARY_LOCATION}"
fi fi
if [ "$CC_DOWNLOAD_ONLY" = "true" ]; if [ "$CC_DOWNLOAD_ONLY" = "true" ];
then then
say "$g==>$x Codecov download only called. Exiting..." say "$g==>$x Codecov download only called. Exiting..."
fi fi
c_cli_args=() cc_cli_args=()
c_cli_args+=( $(k_arg AUTO_LOAD_PARAMS_FROM) $(v_arg AUTO_LOAD_PARAMS_FROM)) cc_cli_args+=( $(k_arg AUTO_LOAD_PARAMS_FROM) $(v_arg AUTO_LOAD_PARAMS_FROM))
c_cli_args+=( $(k_arg ENTERPRISE_URL) $(v_arg ENTERPRISE_URL)) cc_cli_args+=( $(k_arg ENTERPRISE_URL) $(v_arg ENTERPRISE_URL))
if [ -n "$CC_YML_PATH" ] if [ -n "$CC_YML_PATH" ]
then then
c_cli_args+=( "--codecov-yml-path" ) cc_cli_args+=( "--codecov-yml-path" )
c_cli_args+=( "$CC_YML_PATH" ) cc_cli_args+=( "$CC_YML_PATH" )
fi fi
c_cli_args+=( $(write_bool_args CC_DISABLE_TELEM) ) cc_cli_args+=( $(write_truthy_args CC_DISABLE_TELEM) )
c_cli_args+=( $(write_bool_args CC_VERBOSE) ) cc_cli_args+=( $(write_truthy_args CC_VERBOSE) )
if [ -n "$CC_TOKEN_VAR" ]; if [ -n "$CC_TOKEN_VAR" ];
then then
token="$(eval echo \$$CC_TOKEN_VAR)" token="$(eval echo \$$CC_TOKEN_VAR)"
@@ -159,101 +159,100 @@ then
token_str+=" -t <redacted>" token_str+=" -t <redacted>"
token_arg+=( " -t " "$token") token_arg+=( " -t " "$token")
fi fi
c_args=()
if [ "$CC_RUN_CMD" == "upload-coverage" ]; then if [ "$CC_RUN_CMD" == "upload-coverage" ]; then
cc_args=()
# Args for create commit # Args for create commit
c_args+=( $(write_bool_args CC_FAIL_ON_ERROR) ) cc_args+=( $(write_truthy_args CC_FAIL_ON_ERROR) )
c_args+=( $(k_arg GIT_SERVICE) $(v_arg GIT_SERVICE)) cc_args+=( $(k_arg GIT_SERVICE) $(v_arg GIT_SERVICE))
c_args+=( $(k_arg PARENT_SHA) $(v_arg PARENT_SHA)) cc_args+=( $(k_arg PARENT_SHA) $(v_arg PARENT_SHA))
c_args+=( $(k_arg PR) $(v_arg PR)) cc_args+=( $(k_arg PR) $(v_arg PR))
c_args+=( $(k_arg SHA) $(v_arg SHA)) cc_args+=( $(k_arg SHA) $(v_arg SHA))
c_args+=( $(k_arg SLUG) $(v_arg SLUG)) cc_args+=( $(k_arg SLUG) $(v_arg SLUG))
# Args for create report # Args for create report
c_args+=( $(k_arg CODE) $(v_arg CODE)) cc_args+=( $(k_arg CODE) $(v_arg CODE))
# Args for do upload # Args for do upload
c_args+=( $(k_arg ENV) $(v_arg ENV)) cc_args+=( $(k_arg ENV) $(v_arg ENV))
OLDIFS=$IFS;IFS=, OLDIFS=$IFS;IFS=,
c_args+=( $(k_arg BRANCH) $(v_arg BRANCH)) cc_args+=( $(k_arg BRANCH) $(v_arg BRANCH))
c_args+=( $(k_arg BUILD) $(v_arg BUILD)) cc_args+=( $(k_arg BUILD) $(v_arg BUILD))
c_args+=( $(k_arg BUILD_URL) $(v_arg BUILD_URL)) cc_args+=( $(k_arg BUILD_URL) $(v_arg BUILD_URL))
c_args+=( $(k_arg DIR) $(v_arg DIR)) cc_args+=( $(k_arg DIR) $(v_arg DIR))
c_args+=( $(write_bool_args CC_DISABLE_FILE_FIXES) ) cc_args+=( $(write_truthy_args CC_DISABLE_FILE_FIXES) )
c_args+=( $(write_bool_args CC_DISABLE_SEARCH) ) cc_args+=( $(write_truthy_args CC_DISABLE_SEARCH) )
c_args+=( $(write_bool_args CC_DRY_RUN) ) cc_args+=( $(write_truthy_args CC_DRY_RUN) )
if [ -n "$CC_EXCLUDES" ]; if [ -n "$CC_EXCLUDES" ];
then then
for directory in $CC_EXCLUDES; do for directory in $CC_EXCLUDES; do
c_args+=( "--exclude" "$directory" ) cc_args+=( "--exclude" "$directory" )
done done
fi fi
if [ -n "$CC_FILES" ]; if [ -n "$CC_FILES" ];
then then
for file in $CC_FILES; do for file in $CC_FILES; do
c_args+=( "--file" "$file" ) cc_args+=( "--file" "$file" )
done done
fi fi
if [ -n "$CC_FLAGS" ]; if [ -n "$CC_FLAGS" ];
then then
for flag in $CC_FLAGS; do for flag in $CC_FLAGS; do
c_args+=( "--flag" "$flag" ) cc_args+=( "--flag" "$flag" )
done done
fi fi
c_args+=( $(k_arg GCOV_ARGS) $(v_arg GCOV_ARGS)) cc_args+=( $(k_arg GCOV_ARGS) $(v_arg GCOV_ARGS))
c_args+=( $(k_arg GCOV_EXECUTABLE) $(v_arg GCOV_EXECUTABLE)) cc_args+=( $(k_arg GCOV_EXECUTABLE) $(v_arg GCOV_EXECUTABLE))
c_args+=( $(k_arg GCOV_IGNORE) $(v_arg GCOV_IGNORE)) cc_args+=( $(k_arg GCOV_IGNORE) $(v_arg GCOV_IGNORE))
c_args+=( $(k_arg GCOV_INCLUDE) $(v_arg GCOV_INCLUDE)) cc_args+=( $(k_arg GCOV_INCLUDE) $(v_arg GCOV_INCLUDE))
c_args+=( $(write_bool_args CC_HANDLE_NO_REPORTS_FOUND) ) cc_args+=( $(write_truthy_args CC_HANDLE_NO_REPORTS_FOUND) )
c_args+=( $(write_bool_args CC_RECURSE_SUBMODULES) ) cc_args+=( $(k_arg JOB_CODE) $(v_arg JOB_CODE))
c_args+=( $(k_arg JOB_CODE) $(v_arg JOB_CODE)) cc_args+=( $(write_truthy_args CC_LEGACY) )
c_args+=( $(write_bool_args CC_LEGACY) )
if [ -n "$CC_NAME" ]; if [ -n "$CC_NAME" ];
then then
c_args+=( "--name" "$CC_NAME" ) cc_args+=( "--name" "$CC_NAME" )
fi fi
c_args+=( $(k_arg NETWORK_FILTER) $(v_arg NETWORK_FILTER)) cc_args+=( $(k_arg NETWORK_FILTER) $(v_arg NETWORK_FILTER))
c_args+=( $(k_arg NETWORK_PREFIX) $(v_arg NETWORK_PREFIX)) cc_args+=( $(k_arg NETWORK_PREFIX) $(v_arg NETWORK_PREFIX))
c_args+=( $(k_arg NETWORK_ROOT_FOLDER) $(v_arg NETWORK_ROOT_FOLDER)) cc_args+=( $(k_arg NETWORK_ROOT_FOLDER) $(v_arg NETWORK_ROOT_FOLDER))
if [ -n "$CC_PLUGINS" ]; if [ -n "$CC_PLUGINS" ];
then then
for plugin in $CC_PLUGINS; do for plugin in $CC_PLUGINS; do
c_args+=( "--plugin" "$plugin" ) cc_args+=( "--plugin" "$plugin" )
done done
fi fi
c_args+=( $(k_arg REPORT_TYPE) $(v_arg REPORT_TYPE)) cc_args+=( $(k_arg REPORT_TYPE) $(v_arg REPORT_TYPE))
c_args+=( $(k_arg SWIFT_PROJECT) $(v_arg SWIFT_PROJECT)) cc_args+=( $(k_arg SWIFT_PROJECT) $(v_arg SWIFT_PROJECT))
IFS=$OLDIFS IFS=$OLDIFS
elif [ "$CC_RUN_CMD" == "empty-upload" ]; then elif [ "$CC_RUN_CMD" == "empty-upload" ]; then
c_args+=( $(k_arg BRANCH) $(v_arg BRANCH)) cc_args=()
c_args+=( $(write_bool_args CC_FAIL_ON_ERROR) ) cc_args+=( $(write_truthy_args CC_FAIL_ON_ERROR) )
c_args+=( $(write_bool_args CC_FORCE) ) cc_args+=( $(write_truthy_args CC_FORCE) )
c_args+=( $(k_arg GIT_SERVICE) $(v_arg GIT_SERVICE)) cc_args+=( $(k_arg GIT_SERVICE) $(v_arg GIT_SERVICE))
c_args+=( $(k_arg PARENT_SHA) $(v_arg PARENT_SHA)) cc_args+=( $(k_arg SHA) $(v_arg SHA))
c_args+=( $(k_arg PR) $(v_arg PR)) cc_args+=( $(k_arg SLUG) $(v_arg SLUG))
c_args+=( $(k_arg SHA) $(v_arg SHA))
c_args+=( $(k_arg SLUG) $(v_arg SLUG))
elif [ "$CC_RUN_CMD" == "pr-base-picking" ]; then elif [ "$CC_RUN_CMD" == "pr-base-picking" ]; then
c_args+=( $(k_arg BASE_SHA) $(v_arg BASE_SHA)) cc_args=()
c_args+=( $(k_arg PR) $(v_arg PR)) cc_args+=( $(k_arg BASE_SHA) $(v_arg BASE_SHA))
c_args+=( $(k_arg SLUG) $(v_arg SLUG)) cc_args+=( $(k_arg PR) $(v_arg PR))
c_args+=( $(k_arg SERVICE) $(v_arg SERVICE)) cc_args+=( $(k_arg SLUG) $(v_arg SLUG))
cc_args+=( $(k_arg SERVICE) $(v_arg SERVICE))
elif [ "$CC_RUN_CMD" == "send-notifications" ]; then elif [ "$CC_RUN_CMD" == "send-notifications" ]; then
c_args+=( $(k_arg SHA) $(v_arg SHA)) cc_args=()
c_args+=( $(write_bool_args CC_FAIL_ON_ERROR) ) cc_args+=( $(k_arg SHA) $(v_arg SHA))
c_args+=( $(k_arg GIT_SERVICE) $(v_arg GIT_SERVICE)) cc_args+=( $(write_truthy_args CC_FAIL_ON_ERROR) )
c_args+=( $(k_arg SLUG) $(v_arg SLUG)) cc_args+=( $(k_arg GIT_SERVICE) $(v_arg GIT_SERVICE))
cc_args+=( $(k_arg SLUG) $(v_arg SLUG))
else else
exit_if_error "Invalid run command specified: $CC_RUN_CMD" exit_if_error "Invalid run command specified: $CC_RUN_CMD"
exit exit
fi fi
unset NODE_OPTIONS unset NODE_OPTIONS
# github.com/codecov/uploader/issues/475 # See https://github.com/codecov/uploader/issues/475
say "$g==>$x Running $CC_RUN_CMD" say "$g==>$x Running $CC_RUN_CMD"
say " $b$c_command $(echo "${c_cli_args[@]}") $CC_RUN_CMD$token_str $(echo "${c_args[@]}")$x" say " $b$cc_command $(echo "${cc_cli_args[@]}")$CC_RUN_CMD$token_str $(echo "${cc_args[@]}")$x"
if ! $c_command \ if ! $cc_command \
${c_cli_args[*]} \ ${cc_cli_args[*]} \
${CC_RUN_CMD} \ ${CC_RUN_CMD} \
${token_arg[*]} \ ${token_arg[*]} \
"${c_args[@]}"; "${cc_args[@]}";
then then
exit_if_error "Failed to run $CC_RUN_CMD" exit_if_error "Failed to run $CC_RUN_CMD"
fi fi

View File

@@ -1 +1 @@
5.4.3 5.3.1