Skip to content

Commit

Permalink
Always set the versioned runtime.tool property for all installed tools (
Browse files Browse the repository at this point in the history
#1106)

For example if we have bossac 1.7.1 and 1.9.0 installed, this will
result in the following properties available during upload:

{runtime.tools.bossac-1.7.0-arduino3.path} => /path/to/bossac/1.7.0
{runtime.tools.bossac-1.9.0-arduino3.path} => /path/to/bossac/1.9.0
{runtime.tools.bossac.path} => /path/to/bossac/1.9.0

some platforms fails to correctly specify the version of the tool in the
package_index.json but they do the correct specification in the recipes.
This patch allows to not fail in this latter case.
  • Loading branch information
cmaglie committed Dec 15, 2020
1 parent e20cbc1 commit cbb9d19
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions commands/upload/upload.go
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,9 @@ func runProgramAction(pm *packagemanager.PackageManager,
uploadProperties.Merge(programmer.Properties)
}

for _, tool := range pm.GetAllInstalledToolsReleases() {
uploadProperties.Merge(tool.RuntimeProperties())
}
if requiredTools, err := pm.FindToolsRequiredForBoard(board); err == nil {
for _, requiredTool := range requiredTools {
logrus.WithField("tool", requiredTool).Info("Tool required for upload")
Expand Down

0 comments on commit cbb9d19

Please sign in to comment.