summaryrefslogtreecommitdiffstats
path: root/models/repo_mirror.go
diff options
context:
space:
mode:
Diffstat (limited to 'models/repo_mirror.go')
-rw-r--r--models/repo_mirror.go10
1 files changed, 10 insertions, 0 deletions
diff --git a/models/repo_mirror.go b/models/repo_mirror.go
index 526b7cd02e..60d4f9f05a 100644
--- a/models/repo_mirror.go
+++ b/models/repo_mirror.go
@@ -13,6 +13,7 @@ import (
"github.com/go-xorm/xorm"
"gopkg.in/ini.v1"
+ "code.gitea.io/git"
"code.gitea.io/gitea/modules/log"
"code.gitea.io/gitea/modules/process"
"code.gitea.io/gitea/modules/setting"
@@ -156,6 +157,15 @@ func (m *Mirror) runSync() bool {
return false
}
+ gitRepo, err := git.OpenRepository(repoPath)
+ if err != nil {
+ log.Error(4, "OpenRepository: %v", err)
+ return false
+ }
+ if err = SyncReleasesWithTags(m.Repo, gitRepo); err != nil {
+ log.Error(4, "Failed to synchronize tags to releases for repository: %v", err)
+ }
+
if err := m.Repo.UpdateSize(); err != nil {
log.Error(4, "Failed to update size for mirror repository: %v", err)
}