diff options
Diffstat (limited to 'models/packages')
-rw-r--r-- | models/packages/descriptor.go | 3 | ||||
-rw-r--r-- | models/packages/package.go | 6 |
2 files changed, 9 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: diff --git a/models/packages/package.go b/models/packages/package.go index 32f30fab9b..ccc9257c31 100644 --- a/models/packages/package.go +++ b/models/packages/package.go @@ -44,6 +44,7 @@ const ( TypePub Type = "pub" TypePyPI Type = "pypi" TypeRubyGems Type = "rubygems" + TypeSwift Type = "swift" TypeVagrant Type = "vagrant" ) @@ -62,6 +63,7 @@ var TypeList = []Type{ TypePub, TypePyPI, TypeRubyGems, + TypeSwift, TypeVagrant, } @@ -96,6 +98,8 @@ func (pt Type) Name() string { return "PyPI" case TypeRubyGems: return "RubyGems" + case TypeSwift: + return "Swift" case TypeVagrant: return "Vagrant" } @@ -133,6 +137,8 @@ func (pt Type) SVGName() string { return "gitea-python" case TypeRubyGems: return "gitea-rubygems" + case TypeSwift: + return "gitea-swift" case TypeVagrant: return "gitea-vagrant" } |