Skip to content

Commit bd49c81

Browse files
committed
Updated compile/upload cli commands
1 parent bc37966 commit bd49c81

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

cli/compile/compile.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ var (
4646
uploadAfterCompile bool // Upload the binary after the compilation.
4747
port string // Upload port, e.g.: COM10 or /dev/ttyACM0.
4848
verify bool // Upload, verify uploaded binary after the upload.
49-
exportFile string // The compiled binary is written to this file
49+
exportDir string // The compiled binary is written to this file
5050
dryRun bool // Use this flag to now write the output file
5151
libraries []string // List of custom libraries paths separated by commas. Or can be used multiple times for multiple libraries paths.
5252
optimizeForDebug bool // Optimize compile output for debug, not for release
@@ -67,7 +67,7 @@ func NewCommand() *cobra.Command {
6767
command.Flags().BoolVar(&showProperties, "show-properties", false, "Show all build properties used instead of compiling.")
6868
command.Flags().BoolVar(&preprocess, "preprocess", false, "Print preprocessed code to stdout instead of compiling.")
6969
command.Flags().StringVar(&buildCachePath, "build-cache-path", "", "Builds of 'core.a' are saved into this path to be cached and reused.")
70-
command.Flags().StringVarP(&exportFile, "output", "o", "", "Filename of the compile output.")
70+
command.Flags().StringVarP(&exportDir, "output-dir", "", "", "Save build artifacts in this directory.")
7171
command.Flags().BoolVarP(&dryRun, "dry-run", "n", false, "Perform the build but do not copy the compile output file.")
7272
command.Flags().StringVar(&buildPath, "build-path", "",
7373
"Path where to save compiled files. If omitted, a directory will be created in the default temporary path of your OS.")
@@ -115,7 +115,7 @@ func run(cmd *cobra.Command, args []string) {
115115
Verbose: verbose,
116116
Quiet: quiet,
117117
VidPid: vidPid,
118-
ExportFile: exportFile,
118+
ExportDir: exportDir,
119119
DryRun: dryRun,
120120
Libraries: libraries,
121121
OptimizeForDebug: optimizeForDebug,
@@ -134,7 +134,7 @@ func run(cmd *cobra.Command, args []string) {
134134
Port: port,
135135
Verbose: verbose,
136136
Verify: verify,
137-
ImportFile: exportFile,
137+
ImportDir: exportDir,
138138
}, os.Stdout, os.Stderr)
139139

140140
if err != nil {

cli/upload/upload.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,11 @@ import (
3030
)
3131

3232
var (
33-
fqbn string
34-
port string
35-
verbose bool
36-
verify bool
37-
importFile string
33+
fqbn string
34+
port string
35+
verbose bool
36+
verify bool
37+
importDir string
3838
)
3939

4040
// NewCommand created a new `upload` command
@@ -50,7 +50,7 @@ func NewCommand() *cobra.Command {
5050

5151
uploadCommand.Flags().StringVarP(&fqbn, "fqbn", "b", "", "Fully Qualified Board Name, e.g.: arduino:avr:uno")
5252
uploadCommand.Flags().StringVarP(&port, "port", "p", "", "Upload port, e.g.: COM10 or /dev/ttyACM0")
53-
uploadCommand.Flags().StringVarP(&importFile, "input", "i", "", "Input file to be uploaded.")
53+
uploadCommand.Flags().StringVarP(&importDir, "input-dir", "", "", "Direcory containing binaries to upload.")
5454
uploadCommand.Flags().BoolVarP(&verify, "verify", "t", false, "Verify uploaded binary after the upload.")
5555
uploadCommand.Flags().BoolVarP(&verbose, "verbose", "v", false, "Optional, turns on verbose mode.")
5656

@@ -77,7 +77,7 @@ func run(command *cobra.Command, args []string) {
7777
Port: port,
7878
Verbose: verbose,
7979
Verify: verify,
80-
ImportFile: importFile,
80+
ImportDir: importDir,
8181
}, os.Stdout, os.Stderr); err != nil {
8282
feedback.Errorf("Error during Upload: %v", err)
8383
os.Exit(errorcodes.ErrGeneric)

0 commit comments

Comments
 (0)