Skip to content

Commit 6644d04

Browse files
committed
Added 3rd party platform url in InstalledPlatofrm grpc response
1 parent 61563a4 commit 6644d04

File tree

3 files changed

+37
-19
lines changed

3 files changed

+37
-19
lines changed

arduino/cores/cores.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -360,10 +360,15 @@ func (release *PlatformRelease) String() string {
360360

361361
// ToRPCPlatformReference creates a gRPC PlatformReference message out of this PlatformRelease
362362
func (release *PlatformRelease) ToRPCPlatformReference() *rpc.InstalledPlatformReference {
363+
url := release.Platform.Package.URL
364+
if strings.HasPrefix(url, "https://downloads.arduino.cc/packages/package_index.") {
365+
url = ""
366+
}
363367
return &rpc.InstalledPlatformReference{
364368
Id: release.Platform.String(),
365369
Version: release.Version.String(),
366370
InstallDir: release.InstallDir.String(),
371+
PackageUrl: url,
367372
}
368373
}
369374

rpc/cc/arduino/cli/commands/v1/common.pb.go

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

rpc/cc/arduino/cli/commands/v1/common.proto

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,8 @@ message InstalledPlatformReference {
8989
string version = 2;
9090
// Installation directory of the platform
9191
string install_dir = 3;
92+
// 3rd party platform URL
93+
string package_url = 4;
9294
}
9395

9496
message Board {

0 commit comments

Comments
 (0)