summaryrefslogtreecommitdiffstats
path: root/models/release.go
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2019-07-24 15:13:26 +0800
committerGitHub <noreply@github.com>2019-07-24 15:13:26 +0800
commit2c5c458dd70a0651b137d1af62fb50de5af4e9af (patch)
tree0bf59421813c65a3f03ec661f1532c74e84fbe61 /models/release.go
parentc236ba35ca11d8f40fdd1ded504f7fe31731176e (diff)
downloadgitea-2c5c458dd70a0651b137d1af62fb50de5af4e9af.tar.gz
gitea-2c5c458dd70a0651b137d1af62fb50de5af4e9af.zip
Move models.PushUpdate to repofiles.PushUpdate (#7485)
* move models.PushUpdate to repofiles.PushUpdate * remove duplicated code to load repo
Diffstat (limited to 'models/release.go')
-rw-r--r--models/release.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/models/release.go b/models/release.go
index f8e8c17e74..ecb9d1e44a 100644
--- a/models/release.go
+++ b/models/release.go
@@ -495,8 +495,8 @@ func SyncReleasesWithTags(repo *Repository, gitRepo *git.Repository) error {
return fmt.Errorf("GetTagCommitID: %v", err)
}
if git.IsErrNotExist(err) || commitID != rel.Sha1 {
- if err := pushUpdateDeleteTag(repo, rel.TagName); err != nil {
- return fmt.Errorf("pushUpdateDeleteTag: %v", err)
+ if err := PushUpdateDeleteTag(repo, rel.TagName); err != nil {
+ return fmt.Errorf("PushUpdateDeleteTag: %v", err)
}
} else {
existingRelTags[strings.ToLower(rel.TagName)] = struct{}{}
@@ -509,7 +509,7 @@ func SyncReleasesWithTags(repo *Repository, gitRepo *git.Repository) error {
}
for _, tagName := range tags {
if _, ok := existingRelTags[strings.ToLower(tagName)]; !ok {
- if err := pushUpdateAddTag(repo, gitRepo, tagName); err != nil {
+ if err := PushUpdateAddTag(repo, gitRepo, tagName); err != nil {
return fmt.Errorf("pushUpdateAddTag: %v", err)
}
}