Skip to content

Commit 16a67ec

Browse files
committed
Using semver for versioning
1 parent b8512df commit 16a67ec

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

setup_build_properties.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,11 +100,11 @@ func (s *SetupBuildProperties) Run(ctx *types.Context) error {
100100

101101
for _, tool := range ctx.AllTools {
102102
buildProperties["runtime.tools."+tool.Tool.Name+".path"] = tool.InstallDir.String()
103-
buildProperties["runtime.tools."+tool.Tool.Name+"-"+tool.Version+".path"] = tool.InstallDir.String()
103+
buildProperties["runtime.tools."+tool.Tool.Name+"-"+tool.Version.String()+".path"] = tool.InstallDir.String()
104104
}
105105
for _, tool := range ctx.RequiredTools {
106106
buildProperties["runtime.tools."+tool.Tool.Name+".path"] = tool.InstallDir.String()
107-
buildProperties["runtime.tools."+tool.Tool.Name+"-"+tool.Version+".path"] = tool.InstallDir.String()
107+
buildProperties["runtime.tools."+tool.Tool.Name+"-"+tool.Version.String()+".path"] = tool.InstallDir.String()
108108
}
109109

110110
if !utils.MapStringStringHas(buildProperties, "software") {

test/tools_loader_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@ func (s ByToolIDAndVersion) Less(i, j int) bool {
5252
if s[i].Tool.Name != s[j].Tool.Name {
5353
return s[i].Tool.Name < s[j].Tool.Name
5454
}
55-
if s[i].Version != s[j].Version {
56-
return s[i].Version < s[j].Version
55+
if !s[i].Version.Equal(s[j].Version) {
56+
return s[i].Version.LessThan(s[j].Version)
5757
}
5858
return s[i].InstallDir.String() < s[j].InstallDir.String()
5959
}

0 commit comments

Comments
 (0)