arduino-cli icon indicating copy to clipboard operation
arduino-cli copied to clipboard

Added possibility to set custom properties on upload/burn-bootloader/debug commands.

Open cmaglie opened this issue 1 year ago • 1 comments
trafficstars

Please check if the PR fulfills these requirements

See how to contribute

  • [X] The PR has no duplicates (please search among the Pull Requests before creating one)
  • [X] The PR follows our contributing guidelines
  • [ ] Tests for the changes have been added (for bug fixes / features)
  • [ ] Docs have been added / updated (for bug fixes / features)
  • [ ] UPGRADING.md has been updated with a migration guide (for breaking changes)
  • [ ] configuration.schema.json updated if new parameters are added.

What kind of change does this PR introduce?

As requested in https://github.com/arduino/arduino-cli/issues/2615 this PR adds the --build-property equivalent flag to the commands upload, burn-bootloader, debug and debug check. On each command, the flag has a slightly different name to emphasize that those are not strictly "build" properties:

The command... ...provides the flag
compile --build-property
upload --upload-property
burn-bootloader --upload-property
debug --debug-property
debug check --debug-property

What is the current behavior?

No possibility to set custom properties on upload, burn-bootloader, debug, and debug check commands.

What is the new behavior?

$ arduino-cli upload -h | grep properties
      --upload-property stringArray   Override an upload property with a custom value. Can be used multiple times for multiple properties.

$ arduino-cli burn-bootloader -h | grep properties
      --upload-property stringArray   Override an upload property with a custom value. Can be used multiple times for multiple properties.

$ arduino-cli debug -h | grep properties
      --debug-property stringArray   Override an debug property with a custom value. Can be used multiple times for multiple properties.

$ arduino-cli debug check -h | grep properties
      --debug-property stringArray   Override an debug property with a custom value. Can be used multiple times for multiple properties.

Does this PR introduce a breaking change, and is titled accordingly?

No.

Other information

Fix #2615

cmaglie avatar Aug 21 '24 15:08 cmaglie

Codecov Report

Attention: Patch coverage is 70.32967% with 27 lines in your changes missing coverage. Please review.

Project coverage is 67.66%. Comparing base (c5812ee) to head (324c30f). Report is 2 commits behind head on master.

Files with missing lines Patch % Lines
commands/service_upload.go 16.66% 14 Missing and 1 partial :warning:
internal/cli/burnbootloader/burnbootloader.go 20.00% 8 Missing :warning:
commands/service_debug_config.go 76.92% 2 Missing and 1 partial :warning:
commands/service_upload_burnbootloader.go 0.00% 1 Missing :warning:
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2693      +/-   ##
==========================================
- Coverage   67.67%   67.66%   -0.01%     
==========================================
  Files         234      234              
  Lines       22176    22205      +29     
==========================================
+ Hits        15007    15026      +19     
- Misses       5990     5998       +8     
- Partials     1179     1181       +2     
Flag Coverage Δ
unit 67.66% <70.32%> (-0.01%) :arrow_down:

Flags with carried forward coverage won't be shown. Click here to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Aug 21 '24 15:08 codecov[bot]