mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 08:30:25 +08:00 
			
		
		
		
	Add support for Vagrant packages (#20930)
* Add support for Vagrant boxes. * Add authentication. * Add tests. * Add integration tests. * Add docs. * Add icons. * Update routers/api/packages/api.go Co-authored-by: Lauris BH <lauris@nix.lv> Co-authored-by: 6543 <6543@obermui.de>
This commit is contained in:
		@@ -22,6 +22,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/vagrant"
 | 
			
		||||
 | 
			
		||||
	"github.com/hashicorp/go-version"
 | 
			
		||||
)
 | 
			
		||||
@@ -150,6 +151,8 @@ func GetPackageDescriptor(ctx context.Context, pv *PackageVersion) (*PackageDesc
 | 
			
		||||
		metadata = &pypi.Metadata{}
 | 
			
		||||
	case TypeRubyGems:
 | 
			
		||||
		metadata = &rubygems.Metadata{}
 | 
			
		||||
	case TypeVagrant:
 | 
			
		||||
		metadata = &vagrant.Metadata{}
 | 
			
		||||
	default:
 | 
			
		||||
		panic(fmt.Sprintf("unknown package type: %s", string(p.Type)))
 | 
			
		||||
	}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user