Compare commits

..

4 Commits

Author SHA1 Message Date
jimehbot[bot]
67ad73e500 chore(master): release 0.6.60 (#141)
Co-authored-by: jimehbot[bot] <132453784+jimehbot[bot]@users.noreply.github.com>
2025-06-27 22:42:03 +01:00
8ac1f946dd fix(builder/cask): correctly resolve version with build variant to release name (#140) 2025-06-27 22:40:57 +01:00
jimehbot[bot]
cc38319b40 chore(master): release 0.6.59 (#139)
Co-authored-by: jimehbot[bot] <132453784+jimehbot[bot]@users.noreply.github.com>
2025-06-27 15:25:59 +01:00
e8885400e6 fix(builder/plan): append test build name to release name (#138) 2025-06-27 15:24:55 +01:00
5 changed files with 55 additions and 6 deletions

View File

@@ -1,3 +1,3 @@
{
".": "0.6.58"
".": "0.6.60"
}

View File

@@ -1,5 +1,19 @@
# Changelog
## [0.6.60](https://github.com/jimeh/build-emacs-for-macos/compare/v0.6.59...v0.6.60) (2025-06-27)
### Bug Fixes
* **builder/cask:** correctly resolve version with build variant to release name ([#140](https://github.com/jimeh/build-emacs-for-macos/issues/140)) ([8ac1f94](https://github.com/jimeh/build-emacs-for-macos/commit/8ac1f946dde2342fa82aff7f90d2126bdd1f0057))
## [0.6.59](https://github.com/jimeh/build-emacs-for-macos/compare/v0.6.58...v0.6.59) (2025-06-27)
### Bug Fixes
* **builder/plan:** append test build name to release name ([#138](https://github.com/jimeh/build-emacs-for-macos/issues/138)) ([e888540](https://github.com/jimeh/build-emacs-for-macos/commit/e8885400e66bdb9304f99d9b072aa4dec4e83f4b))
## [0.6.58](https://github.com/jimeh/build-emacs-for-macos/compare/v0.6.57...v0.6.58) (2025-06-27)

View File

@@ -146,7 +146,7 @@ func Create(ctx context.Context, opts *Options) (*Plan, error) { //nolint:funlen
plan.Build.Name += ".test." + testName
plan.Release.Title = "Test Builds (" + testName + ")"
plan.Release.Name = "test-builds"
plan.Release.Name = "test-builds-" + testName
plan.Release.Prerelease = false
plan.Release.Draft = true

View File

@@ -4,7 +4,6 @@ import (
"errors"
"fmt"
"regexp"
"strings"
)
// Errors
@@ -18,8 +17,9 @@ var (
)
var (
stableVersion = regexp.MustCompile(`^\d+\.\d+(?:[a-z]+)?$`)
stableGitRef = regexp.MustCompile(`^emacs-(\d+\.\d+(?:[a-z]+)?)$`)
stableVersion = regexp.MustCompile(`^\d+\.\d+(?:[a-z]+)?(-\d+)?$`)
pretestVersion = regexp.MustCompile(`-pretest(-\d+)?$`)
stableGitRef = regexp.MustCompile(`^emacs-(\d+\.\d+(?:[a-z]+)?)$`)
)
func VersionToName(version string) (string, error) {
@@ -28,7 +28,7 @@ func VersionToName(version string) (string, error) {
}
if stableVersion.MatchString(version) ||
strings.HasSuffix(version, "-pretest") {
pretestVersion.MatchString(version) {
return "Emacs-" + version, nil
}

View File

@@ -30,6 +30,27 @@ func TestVersionToName(t *testing.T) {
},
want: "Emacs.2021-07-01.1b88404.master",
},
{
name: "nightly with variant",
args: args{
version: "2021-07-01.1b88404.master-1",
},
want: "Emacs.2021-07-01.1b88404.master-1",
},
{
name: "pretest",
args: args{
version: "30.0.93-pretest",
},
want: "Emacs-30.0.93-pretest",
},
{
name: "pretest with variant",
args: args{
version: "30.0.93-pretest-1",
},
want: "Emacs-30.0.93-pretest-1",
},
{
name: "stable",
args: args{
@@ -44,6 +65,20 @@ func TestVersionToName(t *testing.T) {
},
want: "Emacs-23.3b",
},
{
name: "stable with variant",
args: args{
version: "23.3-1",
},
want: "Emacs-23.3-1",
},
{
name: "stable with letter and variant",
args: args{
version: "23.3b-1",
},
want: "Emacs-23.3b-1",
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {