From b69ade36e520c0ab1f9382ff2f2184ebf39cba14 Mon Sep 17 00:00:00 2001 From: Tom Hu Date: Fri, 25 Dec 2020 15:36:29 -0500 Subject: [PATCH] Only check merge errors on PRs --- SHA1SUM | 2 +- SHA256SUM | 2 +- SHA512SUM | 2 +- codecov | 32 +++++++++++++++++--------------- 4 files changed, 20 insertions(+), 18 deletions(-) diff --git a/SHA1SUM b/SHA1SUM index 4f7adf02..5fe72527 100644 --- a/SHA1SUM +++ b/SHA1SUM @@ -1 +1 @@ -4407b6151fd9a65b5e25ca9cfe026018f2d0a042 codecov +b2d91c9a9e5e44495e7cb28bb01812024f007332 codecov diff --git a/SHA256SUM b/SHA256SUM index 4e2560e5..20c2a21d 100644 --- a/SHA256SUM +++ b/SHA256SUM @@ -1 +1 @@ -c8268e963fc51044d8508a7468671e7ea76288c93fb4a2b701c8a7748bcc725b codecov +980c09cd11e443d3976fd5be6d5d58704bf4c702866974200c0bdb1a275110a2 codecov diff --git a/SHA512SUM b/SHA512SUM index 1824cac0..2b4b6426 100644 --- a/SHA512SUM +++ b/SHA512SUM @@ -1 +1 @@ -556ab0b5e63683a1083941282f43d9d7e08273385f750e19b5623047e95aa159564926f3a1de85addfe3af07bccb2f065d0eefad65b1b6ef7cec1a8921913e59 codecov +a5d92fd71ae5c8ed558f995cc8788a8ea4395431809238591f525e4965f137676ca293caebf206f0a7f59b5690561e6b2642eaf9cba290a6777d51e9aa2d26f2 codecov diff --git a/codecov b/codecov index ea2bb2eb..aa1c445d 100755 --- a/codecov +++ b/codecov @@ -844,15 +844,16 @@ then if [ -n "$pr" ] && [ "$pr" != false ]; then mc=$(git show --no-patch --format="%P" 2>/dev/null || echo "") - fi - if [[ "$mc" =~ ^[a-z0-9]{40}[[:space:]][a-z0-9]{40}$ ]]; - then - mc=$(echo "$mc" | cut -d' ' -f2) - say " Fixing merge commit SHA $commit -> $mc" - commit=$mc - elif [[ "$mc" = "" ]]; - then - say "$r-> Issue detecting commit SHA. Please run actions/checkout with fetch-depth > 1 or set to 0$x" + + if [[ "$mc" =~ ^[a-z0-9]{40}[[:space:]][a-z0-9]{40}$ ]]; + then + mc=$(echo "$mc" | cut -d' ' -f2) + say " Fixing merge commit SHA $commit -> $mc" + commit=$mc + elif [[ "$mc" = "" ]]; + then + say "$r-> Issue detecting commit SHA. Please run actions/checkout with fetch-depth > 1 or set to 0$x" + fi fi elif [ "$SYSTEM_TEAMFOUNDATIONSERVERURI" != "" ]; @@ -880,12 +881,13 @@ then if [ -n "$pr" ] && [ "$pr" != false ]; then mc=$(git show --no-patch --format="%P" 2>/dev/null || echo "") - fi - if [[ "$mc" =~ ^[a-z0-9]{40}[[:space:]][a-z0-9]{40}$ ]]; - then - mc=$(echo "$mc" | cut -d' ' -f2) - say " Fixing merge commit SHA $commit -> $mc" - commit=$mc + + if [[ "$mc" =~ ^[a-z0-9]{40}[[:space:]][a-z0-9]{40}$ ]]; + then + mc=$(echo "$mc" | cut -d' ' -f2) + say " Fixing merge commit SHA $commit -> $mc" + commit=$mc + fi fi elif [ "$CI" = "true" ] && [ "$BITBUCKET_BUILD_NUMBER" != "" ];