Azure: Fix CodeCov upload by using a proper login shell

The CodeCov script needs to be run with a `--login` shell s.t. it has
access to `shasum`,... .

(The previous draft PR was merged with an allowed failure...)
This commit is contained in:
MoonlightSentinel 2022-01-13 12:32:46 +01:00 committed by The Dlang Bot
parent b06929a2c7
commit 2a78210c22
2 changed files with 16 additions and 5 deletions

View file

@ -1,7 +1,15 @@
#!/usr/bin/env bash
set -euox pipefail
# Uploads coverage reports to CodeCov
# Check whether this script was called on it's own
if [[ "${CURL_USER_AGENT:-}" == "" ]]
then
CI_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
source "$CI_DIR/../.azure-pipelines/lib.sh"
fi
# CodeCov gets confused by lst files which it can't match
rm -rf test/runnable/extra-files test/*.lst
@ -57,8 +65,11 @@ fi
gpg --verify "$UPLOADER.SHA256SUM.sig" "$UPLOADER.SHA256SUM"
shasum -a 256 -c "$UPLOADER.SHA256SUM"
# Remove signature files as the uploader apparently includes them...
rm $UPLOADER.*
# Upload the sources
chmod +x "$UPLOADER"
"./$UPLOADER" -p . -Z $UPLOADER_ARGS
rm codecov*
rm "$UPLOADER"