Skip to content

Commit 7e059cf

Browse files
committed
Boards are now extracted from index file when creating PlatformRelease
1 parent 724e8c9 commit 7e059cf

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

arduino/cores/packageindex/index.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ import (
2323
"github.com/arduino/arduino-cli/arduino/resources"
2424
"github.com/arduino/arduino-cli/arduino/security"
2525
"github.com/arduino/go-paths-helper"
26+
"github.com/arduino/go-properties-orderedmap"
2627
"github.com/sirupsen/logrus"
2728
semver "go.bug.st/relaxed-semver"
2829
)
@@ -145,6 +146,15 @@ func (inPlatformRelease indexPlatformRelease) extractPlatformIn(outPackage *core
145146
CachePath: "packages",
146147
}
147148
outPlatformRelease.Help = cores.PlatformReleaseHelp{Online: inPlatformRelease.Help.Online}
149+
outPlatformRelease.Boards = map[string]*cores.Board{}
150+
for _, board := range inPlatformRelease.Boards {
151+
outPlatformRelease.Boards[board.Name] = &cores.Board{
152+
Properties: properties.NewFromHashmap(map[string]string{
153+
"name": board.Name,
154+
}),
155+
PlatformRelease: outPlatformRelease,
156+
}
157+
}
148158
outPlatformRelease.BoardsManifest = inPlatformRelease.extractBoardsManifest()
149159
if deps, err := inPlatformRelease.extractDeps(); err == nil {
150160
outPlatformRelease.Dependencies = deps

0 commit comments

Comments
 (0)