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

Commit

Permalink
Merge pull request #383 from codecov/overwrite-curl-args
Browse files Browse the repository at this point in the history
Move custom curl args to overwrite defaults
  • Loading branch information
thomasrockhu authored Nov 30, 2020
2 parents 9e6c3fe + c3558f8 commit cc6d3fe
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion SHA1SUM
Original file line number Diff line number Diff line change
@@ -1 +1 @@
9b74b6ac968910b35fac08807f342b76f6c2adf5 codecov
830904dd1397e3919f7476b1407a8c3a6aaa9015 codecov
2 changes: 1 addition & 1 deletion SHA256SUM
Original file line number Diff line number Diff line change
@@ -1 +1 @@
5beb0223fbb05da4a1ceaa4a41cbe915384e9d4e5879c76d45258cd25c7aa125 codecov
72ddad1d41f293c6b9ef45207327f055cb40de54469d1180837332c813478305 codecov
2 changes: 1 addition & 1 deletion SHA512SUM
Original file line number Diff line number Diff line change
@@ -1 +1 @@
369d35ccf2a00ef6fa888b211b779bfcf08a21451de52e4886eb61f8cfbb56eb2e0501c41d3b985cc4b86ba8291aec1bbf8fbb19bb4878c1d954290a15aa928f codecov
56bfff7e7f44ec8d9464c969b96669b78ad9aa84a45eec6682b8621d3e415fc0159e39fa37022584f60841b3d6a3a8e0299a4ab84b4562068313aa1da77bc5e5 codecov
9 changes: 6 additions & 3 deletions codecov
Original file line number Diff line number Diff line change
Expand Up @@ -1703,12 +1703,13 @@ else
say "${e}->${x} Pinging Codecov"
say "$url/upload/v4?$queryNoToken"
# shellcheck disable=SC2086,2090
res=$(curl $curl_s -X POST $curlargs $cacert \
res=$(curl $curl_s -X POST $cacert \
--retry 5 --retry-delay 2 --connect-timeout 2 \
-H 'X-Reduced-Redundancy: false' \
-H 'X-Content-Type: application/x-gzip' \
-H 'Content-Length: 0' \
--write-out "\n%{response_code}\n" \
$curlargs \
"$url/upload/v4?$query" || true)
# a good reply is "https://codecov.io" + "\n" + "https://storage.googleapis.com/codecov/..."
s3target=$(echo "$res" | sed -n 2p)
Expand All @@ -1720,10 +1721,11 @@ else
say "${s3target}"

# shellcheck disable=SC2086
s3=$(curl -fiX PUT $curlawsargs \
s3=$(curl -fiX PUT \
--data-binary @"$upload_file.gz" \
-H 'Content-Type: application/x-gzip' \
-H 'Content-Encoding: gzip' \
$curlawsargs \
"$s3target" || true)

if [ "$s3" != "" ];
Expand All @@ -1746,13 +1748,14 @@ else
say "${e}==>${x} Uploading to Codecov"

# shellcheck disable=SC2086,2090
res=$(curl -X POST $curlargs $cacert \
res=$(curl -X POST $cacert \
--data-binary @"$upload_file.gz" \
--retry 5 --retry-delay 2 --connect-timeout 2 \
-H 'Content-Type: text/plain' \
-H 'Content-Encoding: gzip' \
-H 'X-Content-Encoding: gzip' \
-H 'Accept: text/plain' \
$curlargs \
"$url/upload/v2?$query&attempt=$i" || echo 'HTTP 500')
# HTTP 200
# http://....
Expand Down

0 comments on commit cc6d3fe

Please sign in to comment.