Skip to content

Commit 67f597a

Browse files
authored
Merge pull request #336 from slarse/update-bash-uploader-to-1.0.3
Update bash uploader to 1.0.3
2 parents 23d3003 + 95c9f38 commit 67f597a

File tree

2 files changed

+8
-10
lines changed

2 files changed

+8
-10
lines changed

dist/codecov

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
set -e +o pipefail
77

8-
VERSION="1.0.2"
8+
VERSION="1.0.3"
99

1010
codecov_flags=( )
1111
url="https://codecov.io"
@@ -1866,10 +1866,9 @@ else
18661866
-H 'Accept: text/plain' \
18671867
$curlargs \
18681868
"$url/upload/v2?$query&attempt=$i" || echo 'HTTP 500')
1869-
# HTTP 200
1870-
# http://....
1871-
status=$(echo "$res" | head -1 | cut -d' ' -f2)
1872-
if [ "$status" = "" ] || [ "$status" = "200" ];
1869+
# {"message": "Coverage reports upload successfully", "uploaded": true, "queued": true, "id": "...", "url": "https://codecov.io/..."\}
1870+
uploaded=$(grep -o '\"uploaded\": [a-z]*' <<< "$res" | head -1 | cut -d' ' -f2)
1871+
if [ "$uploaded" = "true" ]
18731872
then
18741873
say " Reports have been successfully queued for processing at ${b}$(echo "$res" | head -2 | tail -1)${x}"
18751874
exit 0

src/codecov

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
set -e +o pipefail
77

8-
VERSION="1.0.2"
8+
VERSION="1.0.3"
99

1010
codecov_flags=( )
1111
url="https://codecov.io"
@@ -1866,10 +1866,9 @@ else
18661866
-H 'Accept: text/plain' \
18671867
$curlargs \
18681868
"$url/upload/v2?$query&attempt=$i" || echo 'HTTP 500')
1869-
# HTTP 200
1870-
# http://....
1871-
status=$(echo "$res" | head -1 | cut -d' ' -f2)
1872-
if [ "$status" = "" ] || [ "$status" = "200" ];
1869+
# {"message": "Coverage reports upload successfully", "uploaded": true, "queued": true, "id": "...", "url": "https://codecov.io/..."\}
1870+
uploaded=$(grep -o '\"uploaded\": [a-z]*' <<< "$res" | head -1 | cut -d' ' -f2)
1871+
if [ "$uploaded" = "true" ]
18731872
then
18741873
say " Reports have been successfully queued for processing at ${b}$(echo "$res" | head -2 | tail -1)${x}"
18751874
exit 0

0 commit comments

Comments
 (0)