diff --git a/cmd/fyne/internal/commands/build.go b/cmd/fyne/internal/commands/build.go index c1b3168980..7299ca865f 100644 --- a/cmd/fyne/internal/commands/build.go +++ b/cmd/fyne/internal/commands/build.go @@ -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) } diff --git a/cmd/fyne/internal/commands/build_test.go b/cmd/fyne/internal/commands/build_test.go index aeaac109f3..47d8a54ac6 100644 --- a/cmd/fyne/internal/commands/build_test.go +++ b/cmd/fyne/internal/commands/build_test.go @@ -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")) }