Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
arduino-cli
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Operations
Operations
Metrics
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
xpstem
arduino-cli
Commits
19fdc8aa
Commit
19fdc8aa
authored
Jan 16, 2019
by
Cristian Maglie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed regression upload with MKR1000 and other boards based on samd
parent
99a2de9b
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
9 deletions
+11
-9
commands/upload/upload.go
commands/upload/upload.go
+11
-9
No files found.
commands/upload/upload.go
View file @
19fdc8aa
...
@@ -178,12 +178,6 @@ func run(command *cobra.Command, args []string) {
...
@@ -178,12 +178,6 @@ func run(command *cobra.Command, args []string) {
// Make the filename without the FQBN configs part
// Make the filename without the FQBN configs part
fqbn
.
Configs
=
properties
.
NewMap
()
fqbn
.
Configs
=
properties
.
NewMap
()
fqbnSuffix
:=
strings
.
Replace
(
fqbn
.
String
(),
":"
,
"."
,
-
1
)
fqbnSuffix
:=
strings
.
Replace
(
fqbn
.
String
(),
":"
,
"."
,
-
1
)
outputTmpFile
,
ok
:=
uploadProperties
.
GetOk
(
"recipe.output.tmp_file"
)
if
!
ok
{
formatter
.
PrintErrorMessage
(
"The platform does not define the required property 'recipe.output.tmp_file'."
)
os
.
Exit
(
commands
.
ErrGeneric
)
}
ext
:=
filepath
.
Ext
(
outputTmpFile
)
var
importPath
*
paths
.
Path
var
importPath
*
paths
.
Path
var
importFile
string
var
importFile
string
...
@@ -193,10 +187,18 @@ func run(command *cobra.Command, args []string) {
...
@@ -193,10 +187,18 @@ func run(command *cobra.Command, args []string) {
}
else
{
}
else
{
importPath
=
paths
.
New
(
flags
.
importFile
)
.
Parent
()
importPath
=
paths
.
New
(
flags
.
importFile
)
.
Parent
()
importFile
=
paths
.
New
(
flags
.
importFile
)
.
Base
()
importFile
=
paths
.
New
(
flags
.
importFile
)
.
Base
()
}
outputTmpFile
,
ok
:=
uploadProperties
.
GetOk
(
"recipe.output.tmp_file"
)
outputTmpFile
=
uploadProperties
.
ExpandPropsInString
(
outputTmpFile
)
if
!
ok
{
formatter
.
PrintErrorMessage
(
"The platform does not define the required property 'recipe.output.tmp_file'."
)
os
.
Exit
(
commands
.
ErrGeneric
)
}
ext
:=
filepath
.
Ext
(
outputTmpFile
)
if
strings
.
HasSuffix
(
importFile
,
ext
)
{
if
strings
.
HasSuffix
(
importFile
,
ext
)
{
importFile
=
importFile
[
:
len
(
importFile
)
-
len
(
ext
)]
importFile
=
importFile
[
:
len
(
importFile
)
-
len
(
ext
)]
}
}
}
uploadProperties
.
SetPath
(
"build.path"
,
importPath
)
uploadProperties
.
SetPath
(
"build.path"
,
importPath
)
uploadProperties
.
Set
(
"build.project_name"
,
importFile
)
uploadProperties
.
Set
(
"build.project_name"
,
importFile
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment