From 438265b1267cb12219370813a3d13dac1ba2a715 Mon Sep 17 00:00:00 2001 From: Dan Wallis Date: Sat, 25 Jan 2025 16:43:35 +0000 Subject: [PATCH] Explicitly set auto-detect as default for platform --- README.md | 2 +- action.yml | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index ee03d76d..8c3b09c6 100644 --- a/README.md +++ b/README.md @@ -34,7 +34,7 @@ This action's step needs to run after your test suite has outputted a coverage r | `measure` | _optional_ | Default: `false`. Set to `true` to enable time measurement logging. | | `fail-on-error` | _optional_ | Default: `true`. Set to `false` to avoid CI failure when upload fails due to any errors. | | `coverage-reporter-version` | _optional_ | Default: `latest`. Version of coverage-reporter to use. Make sure to prefix the version number with 'v'. For example: v0.6.9. Not available currently on macOS. | -| `coverage-reporter-platform` | _optional_ | Default: `x86_64`. Platform of coverage-reporter to use on Linux runners. Supported values: `x86_64` (default) and `aarch64` (or `arm64`). | +| `coverage-reporter-platform` | _optional_ | Default: `auto-detect`. Platform of coverage-reporter to use on Linux runners. Supported values: `auto-detect`, `x86_64`, `aarch64`, or `arm64`. | diff --git a/action.yml b/action.yml index c948dc54..ae33b453 100644 --- a/action.yml +++ b/action.yml @@ -74,9 +74,9 @@ inputs: required: false default: 'latest' coverage-reporter-platform: - description: "Platform of coverage-reporter to use on Linux runners. Supported values: x86_64 (default) and aarch64 (or arm64)" + description: "Platform of coverage-reporter to use on Linux runners. Supported values: auto-detect (default), x86_64, aarch64, arm64." required: false - default: 'x86_64' + default: 'auto-detect' branding: color: 'green' icon: 'percent' @@ -148,7 +148,9 @@ runs: # This logic is necessary due to the introduction of multiple platform support starting from v0.6.15. # It selects the correct filename based on the specified platform and version, while ensuring # backward compatibility with earlier versions that only supported a generic Linux binary for x86_64. - [ "$COVERAGE_REPORTER_PLATFORM" ] || COVERAGE_REPORTER_PLATFORM="$(uname -m)" + if [ -z "$COVERAGE_REPORTER_PLATFORM" ] || [ "$COVERAGE_REPORTER_PLATFORM" == "auto-detect" ]; then + COVERAGE_REPORTER_PLATFORM="$(uname -m)" + fi case "$COVERAGE_REPORTER_PLATFORM" in x86_64|"") if version_ge "$COVERAGE_REPORTER_VERSION" "v0.6.15"; then