Skip to content

Commit c9b2aac

Browse files
authored
[semver:patch] Fix issue with Windows curling the bash script (#88)
* [semver:patch] Fix issue with Windows curling the bash script * use native curl
1 parent d7ce050 commit c9b2aac

File tree

4 files changed

+12
-7
lines changed

4 files changed

+12
-7
lines changed

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 1.2.2
2+
**Fixes**
3+
- #88 Fixes issue with Windows curling the bash script
4+
15
## 1.2.1
26
**Fixes**
37
- #87 Fix support for Windows executors

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# codecov-circleci-orb
22

3-
## Latest version 1.2.1
3+
## Latest version 1.2.2
44

55
[![codecov.io](https://codecov.io/github/codecov/codecov-circleci-orb/coverage.svg?branch=master)](https://codecov.io/github/codecov/codecov-circleci-orb)
66
[![Circle CI](https://circleci.com/gh/codecov/codecov-circleci-orb.png?style=badge)](https://circleci.com/gh/codecov/codecov-circleci-orb)

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "codecov-circleci-orb",
3-
"version": "1.2.1",
3+
"version": "1.2.2",
44
"description": "Codecov CircleCI Orb",
55
"main": "index.js",
66
"devDependencies": {

src/@orb.yml

+6-5
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ commands:
5151
steps:
5252
- run:
5353
name: Download Codecov Bash Uploader
54-
command: curl -Outfile codecov -Uri << parameters.url >>
54+
command: Invoke-WebRequest -Uri "<< parameters.url >>" -Outfile codecov
5555
when: << parameters.when >>
5656
- when:
5757
condition: << parameters.validate_url >>
@@ -61,10 +61,11 @@ commands:
6161
command: |
6262
$VERSION=((Select-String -path codecov 'VERSION=\"[0-9\.]*\"' | ForEach-Object {$_.Matches} | Foreach-Object {$_.Groups[0].Value})-split '"')[1]
6363
foreach ($i in 1, 256, 512) {
64-
$hash = (((curl "https://raw.githubusercontent.com/codecov/codecov-bash/${VERSION}/SHA${i}SUM")[0])-split( " " ))[0]
64+
echo "Pulling public hashes from https://github.com/codecov/codecov-bash/releases/download/${VERSION}/SHA${i}SUM"
65+
$hash = (((Invoke-WebRequest -Uri "https://github.com/codecov/codecov-bash/releases/download/${VERSION}/SHA${i}SUM")[0])-split( " " ))[0]
6566
$scripthash = (Get-FileHash -Algorithm "SHA${i}" codecov).hash.ToLower()
6667
If ($scripthash -ne $hash) {
67-
echo "Script hash: ${scripthash}"
68+
echo "Script hash: ${scripthash}"
6869
echo "Published has: ${hash}"
6970
echo "SHASUMs do not match, exiting."
7071
exit 1
@@ -75,7 +76,7 @@ commands:
7576
- run:
7677
name: Upload Coverage Results
7778
command: |
78-
$arguments = @( "-Q", "codecov-circleci-orb-1.2.1" )
79+
$arguments = @( "-Q", "codecov-circleci-orb-1.2.2" )
7980
If ( "<< parameters.token >>" -ne "") {
8081
$arguments += "-t"
8182
$arguments += "<< parameters.token >>"
@@ -125,7 +126,7 @@ commands:
125126
[[ -n "<< parameters.file >>" ]] && args+=( '-f << parameters.file >>' )
126127
[[ -n "<< parameters.xtra_args >>" ]] && args+=( '<< parameters.xtra_args >>' )
127128
bash codecov \
128-
-Q "codecov-circleci-orb-1.2.1" \
129+
-Q "codecov-circleci-orb-1.2.2" \
129130
-t "<< parameters.token >>" \
130131
-n "<< parameters.upload_name >>" \
131132
-F "<< parameters.flags >>" \

0 commit comments

Comments
 (0)