mirror of
https://gitea.com/gitea/tea.git
synced 2026-10-26 11:01:25 +01:00
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:
5 files changed
+41
No files matched your search
@@ -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 {
|
||||
|
||||
Reference in new issue
Block a user