Skip to content
This repository has been archived by the owner on Jan 10, 2023. It is now read-only.

Do merge sha work for Azure as it runs detached head #395

Merged
merged 1 commit into from
Dec 21, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion SHA1SUM
Original file line number Diff line number Diff line change
@@ -1 +1 @@
a0a6a995c0344a91f842d706be0ce382198f9c3e codecov
48ad4d9f3dfd0dd194804c8b7207f03cdcc7e94f codecov
2 changes: 1 addition & 1 deletion SHA256SUM
Original file line number Diff line number Diff line change
@@ -1 +1 @@
6b3a7a4dc3ba8bdaa12b1341cddc310b780d5e9eb1ef51d240c8ada352a763fa codecov
4792a0946df31cd69770156f3172f9ca1c3c318c5c9ab8bb5846eed2987cf77e codecov
2 changes: 1 addition & 1 deletion SHA512SUM
Original file line number Diff line number Diff line change
@@ -1 +1 @@
08c2e1854c0c45fcfcfb8923c5b2799d8cf252f0b75e590dbac1a70506a93688ee1b4dc4c96846575224c58b1e362d0ebb1bcebf163c38cb93bd65484ae9b3bc codecov
f665ab465163bbc54a86b1e46b7cdbdaaba31044f09570ed74891666e53a810fb732dbaaca3c414609f30be6c284a1d9ec017def43ea171b550d3c3eeb3d2c41 codecov
18 changes: 16 additions & 2 deletions codecov
Original file line number Diff line number Diff line change
Expand Up @@ -846,8 +846,9 @@ then
fi
if [[ "$mc" =~ ^[a-z0-9]{40}[[:space:]][a-z0-9]{40}$ ]];
then
say " Fixing merge commit SHA"
commit=$(echo "$mc" | cut -d' ' -f2)
mc=$(echo "$mc" | cut -d' ' -f2)
say " Fixing merge commit SHA $commit -> $mc"
commit=$mc
fi

elif [ "$SYSTEM_TEAMFOUNDATIONSERVERURI" != "" ];
Expand All @@ -870,6 +871,19 @@ then
branch="${BUILD_SOURCEBRANCH#"refs/heads/"}"
build_url=$(urlencode "${SYSTEM_TEAMFOUNDATIONSERVERURI}${SYSTEM_TEAMPROJECT}/_build/results?buildId=${BUILD_BUILDID}")

# azure/pipelines runs in detached HEAD
mc=
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
fi

elif [ "$CI" = "true" ] && [ "$BITBUCKET_BUILD_NUMBER" != "" ];
then
say "$e==>$x Bitbucket detected."
Expand Down