Add support for custom MyGet tenants

Add support for custom MyGet tenants (e.g. dotnet.myget.org)

Sample shield URL would be: `https://img.shields.io/dotnet.myget/dotnet-coreclr/v/Microsoft.DotNet.CoreCLR.svg`
This commit is contained in:
Maarten Balliauw 2016-03-30 09:18:24 +02:00 committed by Thaddee Tyl
parent 290f6bc5d0
commit 22700fd0da

View File

@ -3479,11 +3479,12 @@ mapNugetFeed('nuget', 0, function(match) {
});
// MyGet
mapNugetFeed('myget\\/(.*)', 1, function(match) {
var feed = match[1];
mapNugetFeed('(.+\\.)?myget\\/(.*)', 2, function(match) {
var tenant = match[1] || 'www.'; // eg. dotnet
var feed = match[2];
return {
site: feed,
feed: 'https://www.myget.org/F/' + feed + '/api/v3'
feed: 'https://' + tenant + 'myget.org/F/' + feed + '/api/v3'
};
});