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
939029ef
Commit
939029ef
authored
Aug 30, 2018
by
Mattia Bertorello
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Changed name of GetRelease to FindReleaseWith*
parent
ab16a2b2
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
9 deletions
+9
-9
arduino/cores/cores.go
arduino/cores/cores.go
+4
-4
arduino/cores/packagemanager/download.go
arduino/cores/packagemanager/download.go
+1
-1
arduino/cores/packagemanager/package_manager.go
arduino/cores/packagemanager/package_manager.go
+1
-1
arduino/cores/tools.go
arduino/cores/tools.go
+3
-3
No files found.
arduino/cores/cores.go
View file @
939029ef
...
...
@@ -23,7 +23,7 @@ import (
"github.com/arduino/go-paths-helper"
"github.com/arduino/arduino-cli/arduino/resources"
properties
"github.com/arduino/go-properties-map"
"github.com/arduino/go-properties-map"
"go.bug.st/relaxed-semver"
)
...
...
@@ -111,9 +111,9 @@ func (platform *Platform) GetOrCreateRelease(version *semver.Version) (*Platform
return
release
,
nil
}
//
GetRelease
RelaxedVersion returns the specified release corresponding the provided version,
//
FindReleaseWith
RelaxedVersion returns the specified release corresponding the provided version,
// or nil if not found.
func
(
platform
*
Platform
)
GetRelease
Version
(
version
*
semver
.
Version
)
*
PlatformRelease
{
func
(
platform
*
Platform
)
FindReleaseWith
Version
(
version
*
semver
.
Version
)
*
PlatformRelease
{
// use as an fmt.Stringer
return
platform
.
Releases
[
version
.
String
()]
}
...
...
@@ -125,7 +125,7 @@ func (platform *Platform) GetLatestRelease() *PlatformRelease {
if
latestVersion
==
nil
{
return
nil
}
return
platform
.
GetRelease
Version
(
latestVersion
)
return
platform
.
FindReleaseWith
Version
(
latestVersion
)
}
// GetAllReleasesVersions returns all the version numbers in this Platform Package.
...
...
arduino/cores/packagemanager/download.go
View file @
939029ef
...
...
@@ -81,7 +81,7 @@ func (pm *PackageManager) FindPlatformReleaseDependencies(item *PlatformReferenc
var
release
*
cores
.
PlatformRelease
if
item
.
PlatformVersion
!=
nil
{
release
=
platform
.
GetRelease
Version
(
item
.
PlatformVersion
)
release
=
platform
.
FindReleaseWith
Version
(
item
.
PlatformVersion
)
if
release
==
nil
{
return
nil
,
nil
,
fmt
.
Errorf
(
"required version %s not found for platform %s"
,
item
.
PlatformVersion
,
platform
.
String
())
}
...
...
arduino/cores/packagemanager/package_manager.go
View file @
939029ef
...
...
@@ -288,7 +288,7 @@ func (ta *ToolActions) Release(version *semver.RelaxedVersion) *ToolReleaseActio
if
ta
.
forwardError
!=
nil
{
return
&
ToolReleaseActions
{
forwardError
:
ta
.
forwardError
}
}
release
:=
ta
.
tool
.
GetRelease
RelaxedVersion
(
version
)
release
:=
ta
.
tool
.
FindReleaseWith
RelaxedVersion
(
version
)
if
release
==
nil
{
return
&
ToolReleaseActions
{
forwardError
:
fmt
.
Errorf
(
"release %s not found for tool %s"
,
version
,
ta
.
tool
.
String
())}
}
...
...
arduino/cores/tools.go
View file @
939029ef
...
...
@@ -62,9 +62,9 @@ func (tool *Tool) GetOrCreateRelease(version *semver.RelaxedVersion) *ToolReleas
return
release
}
//
GetRelease
RelaxedVersion returns the specified release corresponding the provided version,
//
FindReleaseWith
RelaxedVersion returns the specified release corresponding the provided version,
// or nil if not found.
func
(
tool
*
Tool
)
GetRelease
RelaxedVersion
(
version
*
semver
.
RelaxedVersion
)
*
ToolRelease
{
func
(
tool
*
Tool
)
FindReleaseWith
RelaxedVersion
(
version
*
semver
.
RelaxedVersion
)
*
ToolRelease
{
return
tool
.
Releases
[
version
.
String
()]
}
...
...
@@ -86,7 +86,7 @@ func (tool *Tool) LatestRelease() *ToolRelease {
return
nil
}
return
tool
.
GetRelease
RelaxedVersion
(
latest
)
return
tool
.
FindReleaseWith
RelaxedVersion
(
latest
)
}
// latestReleaseVersion obtains latest version number.
...
...
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