Skip to content

Commit

Permalink
Correct develop version lookup
Browse files Browse the repository at this point in the history
  • Loading branch information
andydotxyz committed Jan 11, 2025
1 parent 9d4dce9 commit b76dda1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cmd/fyne/internal/commands/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -444,6 +444,8 @@ func normaliseVersion(str string) string {

if pos := strings.Index(str, "-0.20"); pos != -1 {
str = str[:pos] + "-dev"
} else if pos = strings.Index(str, "-rc"); pos != -1 {
str = str[:pos] + "-dev"
}
return version.Normalize(str)
}
1 change: 1 addition & 0 deletions cmd/fyne/internal/commands/build_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -170,4 +170,5 @@ func Test_NormaliseVersion(t *testing.T) {
assert.Equal(t, "2.3.0.0", normaliseVersion("v2.3"))
assert.Equal(t, "2.4.0.0", normaliseVersion("v2.4.0"))
assert.Equal(t, "2.3.6.0-dev", normaliseVersion("v2.3.6-0.20230711180435-d4b95e1cb1eb"))
assert.Equal(t, "2.4.1.0-dev", normaliseVersion("v2.4.1-rc7.0.20230711180435-d4b95e1cb1eb"))
}

0 comments on commit b76dda1

Please sign in to comment.