Skip to content

Commit

Permalink
chore: consistent naming of upload options (#473)
Browse files Browse the repository at this point in the history
* chore: consistent naming of upload options

Makes the `--report-code` of `do-upload` to also accept
`--code`. This makes it consistent with other commands.

closes codecov/feedback#380

* attempt to fix build that is broken for some reason
  • Loading branch information
giovanni-guidini authored Jul 17, 2024
1 parent fd37150 commit f509528
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 2 additions & 4 deletions .github/workflows/build_assets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,7 @@ jobs:
- os: ubuntu-20.04
TARGET: ubuntu
CMD_REQS: >
pip install -r requirements.txt
pip install .
pip install -r requirements.txt && pip install .
CMD_BUILD: >
STATICCODECOV_LIB_PATH=$(find build/ -maxdepth 1 -type d -name 'lib.*' -print -quit | xargs -I {} sh -c "find {} -type f -name 'staticcodecov*' -print -quit | sed 's|^./||'") &&
pyinstaller --add-binary ${STATICCODECOV_LIB_PATH}:. --copy-metadata codecov-cli --hidden-import staticcodecov_languages -F codecov_cli/main.py &&
Expand All @@ -42,8 +41,7 @@ jobs:
- os: windows-latest
TARGET: windows
CMD_REQS: >
pip install -r requirements.txt
pip install .
pip install -r requirements.txt && pip install .
CMD_BUILD: >
pyinstaller --add-binary "build\lib.win-amd64-cpython-311\staticcodecov_languages.cp311-win_amd64.pyd;." --copy-metadata codecov-cli --hidden-import staticcodecov_languages -F codecov_cli\main.py &&
Copy-Item -Path ".\dist\main.exe" -Destination ".\dist\codecovcli_windows.exe"
Expand Down
2 changes: 2 additions & 0 deletions codecov_cli/commands/upload.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ def _turn_env_vars_into_dict(ctx, params, value):

_global_upload_options = [
click.option(
"--code",
"--report-code",
"report_code",
help="The code of the report. If unsure, leave default",
default="default",
),
Expand Down
2 changes: 1 addition & 1 deletion tests/commands/test_invoke_upload_process.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ def test_upload_process_options(mocker):
" -t, --token TEXT Codecov upload token",
" -r, --slug TEXT owner/repo slug used instead of the private",
" repo token in Self-hosted",
" --report-code TEXT The code of the report. If unsure, leave",
" --code, --report-code TEXT The code of the report. If unsure, leave",
" default",
" --network-root-folder PATH Root folder from which to consider paths on",
" the network section [default: (Current",
Expand Down

0 comments on commit f509528

Please sign in to comment.