summaryrefslogtreecommitdiffstats
path: root/models/packages/descriptor.go
diff options
context:
space:
mode:
authorKN4CK3R <admin@oldschoolhack.me>2023-03-13 21:28:39 +0100
committerGitHub <noreply@github.com>2023-03-13 15:28:39 -0500
commitc709fa17a77eae391cafbe72d6b2594f74d86a60 (patch)
tree9c6ab67126c7d59a6db274ec5a9f75cdfe120be6 /models/packages/descriptor.go
parent0a6f6354bbc03d4a3ad382a432113301e9ea9d86 (diff)
downloadgitea-c709fa17a77eae391cafbe72d6b2594f74d86a60.tar.gz
gitea-c709fa17a77eae391cafbe72d6b2594f74d86a60.zip
Add Swift package registry (#22404)
This PR adds a [Swift](https://www.swift.org/) package registry. ![grafik](https://user-images.githubusercontent.com/1666336/211842523-07521cbd-8fb6-400f-820c-ee8048b05ae8.png)
Diffstat (limited to 'models/packages/descriptor.go')
-rw-r--r--models/packages/descriptor.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/models/packages/descriptor.go b/models/packages/descriptor.go
index f4be21e74e..06699b5d57 100644
--- a/models/packages/descriptor.go
+++ b/models/packages/descriptor.go
@@ -24,6 +24,7 @@ import (
"code.gitea.io/gitea/modules/packages/pub"
"code.gitea.io/gitea/modules/packages/pypi"
"code.gitea.io/gitea/modules/packages/rubygems"
+ "code.gitea.io/gitea/modules/packages/swift"
"code.gitea.io/gitea/modules/packages/vagrant"
"github.com/hashicorp/go-version"
@@ -159,6 +160,8 @@ func GetPackageDescriptor(ctx context.Context, pv *PackageVersion) (*PackageDesc
metadata = &pypi.Metadata{}
case TypeRubyGems:
metadata = &rubygems.Metadata{}
+ case TypeSwift:
+ metadata = &swift.Metadata{}
case TypeVagrant:
metadata = &vagrant.Metadata{}
default: