|
|
@ -109,12 +109,14 @@ func UpdateRelease(doer *models.User, gitRepo *git.Repository, rel *models.Relea |
|
|
|
return err |
|
|
|
return err |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if err = models.AddReleaseAttachments(rel.ID, attachmentUUIDs); err != nil { |
|
|
|
|
|
|
|
log.Error("AddReleaseAttachments: %v", err) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if err = rel.LoadAttributes(); err != nil { |
|
|
|
if err = rel.LoadAttributes(); err != nil { |
|
|
|
return err |
|
|
|
return err |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
err = models.AddReleaseAttachments(rel.ID, attachmentUUIDs) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// even if attachments added failed, hooks will be still triggered
|
|
|
|
// even if attachments added failed, hooks will be still triggered
|
|
|
|
mode, _ := models.AccessLevel(doer, rel.Repo) |
|
|
|
mode, _ := models.AccessLevel(doer, rel.Repo) |
|
|
|
if err1 := models.PrepareWebhooks(rel.Repo, models.HookEventRelease, &api.ReleasePayload{ |
|
|
|
if err1 := models.PrepareWebhooks(rel.Repo, models.HookEventRelease, &api.ReleasePayload{ |
|
|
|