fix(release): create download directories, refuse duplicate asset names and empty notes (follow gh)

Signed-off-by: bircni <bircni@icloud.com>
This commit is contained in:
bircni committed 2026-10-18 20:00:24 +02:00
1 parent c97044f76c
commit 90df795abb
5 files changed
+41

No files matched your search

+6
View File
@@ -415,6 +415,9 @@ $ tea release edit v1.0.0-rc1 v1.0.0-rc2 --prerelease=false`,
if err != nil {
return err
}
if opts.Body != nil && *opts.Body == "" {
return clierr.Wrap(clierr.Usage, errors.New("release notes cannot be cleared; Gitea ignores empty notes"))
}
if cmd.Flags().Changed("tag") {
if len(args) != 1 || strings.TrimSpace(fields.tag) == "" {
return clierr.Wrap(clierr.Usage, errors.New("--tag requires one release and a nonempty new tag"))
@@ -439,6 +442,9 @@ $ tea release edit v1.0.0-rc1 v1.0.0-rc2 --prerelease=false`,
}
opts.Body = &editorDraft.Body
}
if editorDraft.Body == "" && fields.editor {
return clierr.Wrap(clierr.Usage, errors.New("release notes cannot be cleared; Gitea ignores empty notes"))
}
return batchDone(a, cmd, args, func(tag string) string { return "release " + tag }, func(tag string) (services.Release, error) {
item, err := service.View(cmd.Context(), tag)
if err != nil {