Skip to content

Commit

Permalink
Merge pull request #7 from jfairley/master
Browse files Browse the repository at this point in the history
feat: allow `file` parameter to be optional
  • Loading branch information
thomasrockhu committed Jan 22, 2019
2 parents 58d74aa + 141f2e6 commit 02f1d3d
Showing 1 changed file with 25 additions and 9 deletions.
34 changes: 25 additions & 9 deletions orb.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ commands:
file:
description: Path to the code coverage data file to upload.
type: string
default: ""
flags:
description: Flag the upload to group coverage metrics (e.g. unittests | integration | ui,chrome)
type: string
Expand All @@ -25,12 +26,27 @@ commands:
type: string
default: ${CIRCLE_BUILD_NUM}
steps:
- run:
name: Upload Coverage Results
command: |
bash <(curl -s https://codecov.io/bash) \
-f << parameters.file >> \
-n << parameters.upload_name >> \
-t << parameters.token >> \
-y << parameters.conf >> \
-F << parameters.flags >> \
- when:
condition: << parameters.file >>
steps:
- run:
name: Upload Coverage Results
command: |
bash <(curl -s https://codecov.io/bash) \
-f << parameters.file >> \
-n << parameters.upload_name >> \
-t << parameters.token >> \
-y << parameters.conf >> \
-F << parameters.flags >> \
- unless:
condition: << parameters.file >>
steps:
- run:
name: Upload Coverage Results
command: |
bash <(curl -s https://codecov.io/bash) \
-n << parameters.upload_name >> \
-t << parameters.token >> \
-y << parameters.conf >> \
-F << parameters.flags >> \

0 comments on commit 02f1d3d

Please sign in to comment.