Skip to content

Commit 4c356f4

Browse files
authored
[semver:minor] Allow xtra_args to be specified (#84)
* [semver:minor] Allow xtra_args to be specified * Minor fixes * bash fu * Update changelog
1 parent b95c45f commit 4c356f4

File tree

5 files changed

+20
-7
lines changed

5 files changed

+20
-7
lines changed

.circleci/config.yml

+1
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ jobs:
4545
- codecov/upload:
4646
file: coverage/coverage-final.json
4747
flags: frontend
48+
xtra_args: -v -Z
4849

4950
workflows:
5051
# This `lint-pack_validate_publish-dev` workflow will run on any commit.

CHANGELOG.md

+7
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
## 1.2.0
2+
**Features**
3+
- #84 Allow extra parameters to be specified from the bash uploader
4+
5+
**Fixes**
6+
- #84 Fixes issue with parameters in #82
7+
18
## 1.1.6
29
**Fixes**
310
- #81 Update bash script with best practices

package-lock.json

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

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.1.6",
3+
"version": "1.2.0",
44
"description": "Codecov CircleCI Orb",
55
"main": "index.js",
66
"devDependencies": {

src/@orb.yml

+10-5
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,10 @@ commands:
3737
description: When should this step run?
3838
type: string
3939
default: "always"
40+
xtra_args:
41+
description: Any extra flags as provided by the bash uploader (e.g. `-v -Z`)
42+
type: string
43+
default: ""
4044
steps:
4145
- run:
4246
name: Download Codecov Bash Uploader
@@ -57,11 +61,12 @@ commands:
5761
- run:
5862
name: Upload Coverage Results
5963
command: |
60-
cat codecov | bash -s -- \
61-
-Q "codecov-circleci-orb-1.1.4" \
62-
[[ -z << parameters.file >> ]] && echo "-f << parameters.file >>" || echo "" \
63-
-f "<< parameters.file >>" \
64+
args=()
65+
[[ -n "<< parameters.file >>" ]] && args+=( '-f << parameters.file >>' )
66+
[[ -n "<< parameters.xtra_args >>" ]] && args+=( '<< parameters.xtra_args >>' )
67+
bash codecov \
68+
-Q "codecov-circleci-orb-1.2.0" \
6469
-t "<< parameters.token >>" \
6570
-n "<< parameters.upload_name >>" \
6671
-F "<< parameters.flags >>" \
67-
-Z || echo 'Codecov upload failed'
72+
${args[@]}

0 commit comments

Comments
 (0)