Skip to content

Commit 76b255f

Browse files
author
rsora
committed
Remove deprecation from importFile param
1 parent 55751c9 commit 76b255f

File tree

7 files changed

+56
-176
lines changed

7 files changed

+56
-176
lines changed

cli/upload/upload.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ var (
3636
verbose bool
3737
verify bool
3838
importDir string
39+
importFile string
3940
programmer string
4041
burnBootloader bool
4142
)
@@ -54,6 +55,7 @@ func NewCommand() *cobra.Command {
5455
uploadCommand.Flags().StringVarP(&fqbn, "fqbn", "b", "", "Fully Qualified Board Name, e.g.: arduino:avr:uno")
5556
uploadCommand.Flags().StringVarP(&port, "port", "p", "", "Upload port, e.g.: COM10 or /dev/ttyACM0")
5657
uploadCommand.Flags().StringVarP(&importDir, "input-dir", "", "", "Directory containing binaries to upload.")
58+
uploadCommand.Flags().StringVarP(&importDir, "input-file", "", "", "Binary file to upload.")
5759
uploadCommand.Flags().BoolVarP(&verify, "verify", "t", false, "Verify uploaded binary after the upload.")
5860
uploadCommand.Flags().BoolVarP(&verbose, "verbose", "v", false, "Optional, turns on verbose mode.")
5961
uploadCommand.Flags().StringVarP(&programmer, "programmer", "P", "", "Optional, use the specified programmer to upload or 'list' to list supported programmers.")
@@ -97,6 +99,7 @@ func run(command *cobra.Command, args []string) {
9799
Port: port,
98100
Verbose: verbose,
99101
Verify: verify,
102+
ImportFile: importFile,
100103
ImportDir: importDir,
101104
Programmer: programmer,
102105
}, os.Stdout, os.Stderr); err != nil {
@@ -113,6 +116,7 @@ func run(command *cobra.Command, args []string) {
113116
Port: port,
114117
Verbose: verbose,
115118
Verify: verify,
119+
ImportFile: importFile,
116120
ImportDir: importDir,
117121
Programmer: programmer,
118122
}, os.Stdout, os.Stderr); err != nil {

rpc/commands/commands.pb.go

Lines changed: 4 additions & 92 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

rpc/commands/upload.pb.go

Lines changed: 33 additions & 32 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

rpc/commands/upload.proto

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,9 @@ message UploadReq {
3939
// After upload, verify that the contents of the memory on the board match the
4040
// uploaded binary.
4141
bool verify = 6;
42-
string import_file = 7 [deprecated = true]; // DEPRECATED: Use import_dir instead
42+
// When `import_file` is specified, it overrides the `import_dir` and `sketch_path`
43+
// params.
44+
string import_file = 7;
4345
// Custom path to a directory containing compiled files. When `import_dir` is
4446
// not specified, the standard build directory under `sketch_path` is used.
4547
string import_dir = 8;

rpc/debug/debug.pb.go

Lines changed: 4 additions & 14 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

rpc/monitor/monitor.pb.go

Lines changed: 4 additions & 14 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)