From d67937bfd6b7a59e0280d4b58f4e17091f14624a Mon Sep 17 00:00:00 2001 From: Alexander Grund Date: Thu, 16 Dec 2021 16:04:55 +0100 Subject: [PATCH 1/3] Remove codecov workaround for appveyor No longer required after https://github.com/codecov/uploader/pull/545 --- ci/codecov.ps1 | 3 --- 1 file changed, 3 deletions(-) diff --git a/ci/codecov.ps1 b/ci/codecov.ps1 index 6c105d54..6df3f4a7 100644 --- a/ci/codecov.ps1 +++ b/ci/codecov.ps1 @@ -31,9 +31,6 @@ if (Get-Command "gpg.exe" -ErrorAction SilentlyContinue){ &"$scriptPath\opencppcoverage.ps1" if ($LASTEXITCODE -ne 0) { Throw "Coverage collection failed." } -# Workaround for https://github.com/codecov/uploader/issues/525 -if("${env:APPVEYOR_PULL_REQUEST_HEAD_COMMIT}" -ne ""){ $env:APPVEYOR_REPO_COMMIT = "${env:APPVEYOR_PULL_REQUEST_HEAD_COMMIT}" } - # Upload ./codecov.exe --name Appveyor --env APPVEYOR_BUILD_WORKER_IMAGE --verbose --nonZero --dir __out --rootDir "${env:BOOST_CI_SRC_FOLDER}" if ($LASTEXITCODE -ne 0) { Throw "Upload of coverage data failed." } From 69fc1607971fdb4ee0510374970cb5cfcade445e Mon Sep 17 00:00:00 2001 From: Alexander Grund Date: Tue, 28 Dec 2021 22:42:03 +0100 Subject: [PATCH 2/3] Remove codecov workaround for GHA No longer required after https://github.com/codecov/uploader/pull/545 --- ci/codecov.sh | 5 ----- 1 file changed, 5 deletions(-) diff --git a/ci/codecov.sh b/ci/codecov.sh index ccadb189..1db30684 100755 --- a/ci/codecov.sh +++ b/ci/codecov.sh @@ -99,11 +99,6 @@ elif [[ "$1" == "upload" ]]; then shasum -a 256 -c codecov.SHA256SUM fi - # Workaround for https://github.com/codecov/uploader/issues/525 - if [ -n "$GITHUB_HEAD_REF" ]; then - export GITHUB_SHA=$(git show --no-patch --format="%P" | awk '{print $NF}') - fi - chmod +x codecov ./codecov --verbose --nonZero ${CODECOV_NAME:+--name "$CODECOV_NAME"} -f coverage.info -X search else From 815b0a13c61caf56b5e8bb68d999de7b639cb005 Mon Sep 17 00:00:00 2001 From: Alexander Grund Date: Fri, 6 May 2022 17:19:24 +0200 Subject: [PATCH 3/3] Make gpg write log output to stdout in PowerShell gpg by default writes to stderr which is treated as "an error occurred" by PowerShell. Hence write log output to stdout (FD 1) too. --- ci/codecov.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ci/codecov.ps1 b/ci/codecov.ps1 index 6df3f4a7..933c1bc4 100644 --- a/ci/codecov.ps1 +++ b/ci/codecov.ps1 @@ -17,9 +17,9 @@ if (Get-Command "gpg.exe" -ErrorAction SilentlyContinue){ Invoke-WebRequest -Uri https://uploader.codecov.io/latest/windows/codecov.exe.SHA256SUM.sig -Outfile codecov.exe.SHA256SUM.sig $ErrorActionPreference = "Continue" - gpg.exe --import codecov.asc + gpg.exe --logger-fd 1 --import codecov.asc if ($LASTEXITCODE -ne 0) { Throw "Importing the key failed." } - gpg.exe --verify codecov.exe.SHA256SUM.sig codecov.exe.SHA256SUM + gpg.exe --logger-fd 1 --verify codecov.exe.SHA256SUM.sig codecov.exe.SHA256SUM if ($LASTEXITCODE -ne 0) { Throw "Signature validation of the SHASUM failed." } If ($(Compare-Object -ReferenceObject $(($(certUtil -hashfile codecov.exe SHA256)[1], "codecov.exe") -join " ") -DifferenceObject $(Get-Content codecov.exe.SHA256SUM)).length -eq 0) { echo "SHASUM verified"