summaryrefslogtreecommitdiffstats
path: root/modules/storage
diff options
context:
space:
mode:
Diffstat (limited to 'modules/storage')
-rw-r--r--modules/storage/storage.go15
1 files changed, 14 insertions, 1 deletions
diff --git a/modules/storage/storage.go b/modules/storage/storage.go
index 984f154db4..b3708908f8 100644
--- a/modules/storage/storage.go
+++ b/modules/storage/storage.go
@@ -114,6 +114,9 @@ var (
Avatars ObjectStorage
// RepoAvatars represents repository avatars storage
RepoAvatars ObjectStorage
+
+ // RepoArchives represents repository archives storage
+ RepoArchives ObjectStorage
)
// Init init the stoarge
@@ -130,7 +133,11 @@ func Init() error {
return err
}
- return initLFS()
+ if err := initLFS(); err != nil {
+ return err
+ }
+
+ return initRepoArchives()
}
// NewStorage takes a storage type and some config and returns an ObjectStorage or an error
@@ -169,3 +176,9 @@ func initRepoAvatars() (err error) {
RepoAvatars, err = NewStorage(setting.RepoAvatar.Storage.Type, &setting.RepoAvatar.Storage)
return
}
+
+func initRepoArchives() (err error) {
+ log.Info("Initialising Repository Archive storage with type: %s", setting.RepoArchive.Storage.Type)
+ RepoArchives, err = NewStorage(setting.RepoArchive.Storage.Type, &setting.RepoArchive.Storage)
+ return
+}