Skip to content
This repository has been archived by the owner on Jul 30, 2024. It is now read-only.
/ NuGet.Jobs Public archive

Commit

Permalink
Merge pull request #712 from NuGet/dev
Browse files Browse the repository at this point in the history
RI dev into master
  • Loading branch information
ryuyu authored Dec 13, 2019
2 parents 80031fd + 578e33f commit 7378476
Show file tree
Hide file tree
Showing 77 changed files with 2,804 additions and 253 deletions.
45 changes: 45 additions & 0 deletions NuGet.Services.Metadata.sln
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,16 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
build.ps1 = build.ps1
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NuGet.Jobs.Catalog2Registration", "src\NuGet.Jobs.Catalog2Registration\NuGet.Jobs.Catalog2Registration.csproj", "{5ABE8807-2209-4948-9FC5-1980A507C47A}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NuGet.Services.V3", "src\NuGet.Services.V3\NuGet.Services.V3.csproj", "{C3F9A738-9759-4B2B-A50D-6507B28A659B}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NuGet.Jobs.Catalog2Registration.Tests", "tests\NuGet.Jobs.Catalog2Registration.Tests\NuGet.Jobs.Catalog2Registration.Tests.csproj", "{296703A3-67BA-4876-8C1D-ACE13DF901EF}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NuGet.Services.V3.Tests", "tests\NuGet.Services.V3.Tests\NuGet.Services.V3.Tests.csproj", "{CCB4D5EF-AC84-449D-AC6E-0A0AD295483A}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NuGet.Jobs.RegistrationComparer", "src\NuGet.Jobs.RegistrationComparer\NuGet.Jobs.RegistrationComparer.csproj", "{4CE6C864-DB4D-4262-A2DD-80BB932F6E8C}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -325,6 +331,18 @@ Global
{7E6903A4-DBE1-444E-A8E3-C1DBB58243E0}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{7E6903A4-DBE1-444E-A8E3-C1DBB58243E0}.Release|x64.ActiveCfg = Release|Any CPU
{7E6903A4-DBE1-444E-A8E3-C1DBB58243E0}.Release|x64.Build.0 = Release|Any CPU
{5ABE8807-2209-4948-9FC5-1980A507C47A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5ABE8807-2209-4948-9FC5-1980A507C47A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5ABE8807-2209-4948-9FC5-1980A507C47A}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{5ABE8807-2209-4948-9FC5-1980A507C47A}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{5ABE8807-2209-4948-9FC5-1980A507C47A}.Debug|x64.ActiveCfg = Debug|Any CPU
{5ABE8807-2209-4948-9FC5-1980A507C47A}.Debug|x64.Build.0 = Debug|Any CPU
{5ABE8807-2209-4948-9FC5-1980A507C47A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{5ABE8807-2209-4948-9FC5-1980A507C47A}.Release|Any CPU.Build.0 = Release|Any CPU
{5ABE8807-2209-4948-9FC5-1980A507C47A}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{5ABE8807-2209-4948-9FC5-1980A507C47A}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{5ABE8807-2209-4948-9FC5-1980A507C47A}.Release|x64.ActiveCfg = Release|Any CPU
{5ABE8807-2209-4948-9FC5-1980A507C47A}.Release|x64.Build.0 = Release|Any CPU
{C3F9A738-9759-4B2B-A50D-6507B28A659B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C3F9A738-9759-4B2B-A50D-6507B28A659B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C3F9A738-9759-4B2B-A50D-6507B28A659B}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
Expand All @@ -337,6 +355,18 @@ Global
{C3F9A738-9759-4B2B-A50D-6507B28A659B}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{C3F9A738-9759-4B2B-A50D-6507B28A659B}.Release|x64.ActiveCfg = Release|Any CPU
{C3F9A738-9759-4B2B-A50D-6507B28A659B}.Release|x64.Build.0 = Release|Any CPU
{296703A3-67BA-4876-8C1D-ACE13DF901EF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{296703A3-67BA-4876-8C1D-ACE13DF901EF}.Debug|Any CPU.Build.0 = Debug|Any CPU
{296703A3-67BA-4876-8C1D-ACE13DF901EF}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{296703A3-67BA-4876-8C1D-ACE13DF901EF}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{296703A3-67BA-4876-8C1D-ACE13DF901EF}.Debug|x64.ActiveCfg = Debug|Any CPU
{296703A3-67BA-4876-8C1D-ACE13DF901EF}.Debug|x64.Build.0 = Debug|Any CPU
{296703A3-67BA-4876-8C1D-ACE13DF901EF}.Release|Any CPU.ActiveCfg = Release|Any CPU
{296703A3-67BA-4876-8C1D-ACE13DF901EF}.Release|Any CPU.Build.0 = Release|Any CPU
{296703A3-67BA-4876-8C1D-ACE13DF901EF}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{296703A3-67BA-4876-8C1D-ACE13DF901EF}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{296703A3-67BA-4876-8C1D-ACE13DF901EF}.Release|x64.ActiveCfg = Release|Any CPU
{296703A3-67BA-4876-8C1D-ACE13DF901EF}.Release|x64.Build.0 = Release|Any CPU
{CCB4D5EF-AC84-449D-AC6E-0A0AD295483A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{CCB4D5EF-AC84-449D-AC6E-0A0AD295483A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{CCB4D5EF-AC84-449D-AC6E-0A0AD295483A}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
Expand All @@ -349,6 +379,18 @@ Global
{CCB4D5EF-AC84-449D-AC6E-0A0AD295483A}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{CCB4D5EF-AC84-449D-AC6E-0A0AD295483A}.Release|x64.ActiveCfg = Release|Any CPU
{CCB4D5EF-AC84-449D-AC6E-0A0AD295483A}.Release|x64.Build.0 = Release|Any CPU
{4CE6C864-DB4D-4262-A2DD-80BB932F6E8C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4CE6C864-DB4D-4262-A2DD-80BB932F6E8C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4CE6C864-DB4D-4262-A2DD-80BB932F6E8C}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{4CE6C864-DB4D-4262-A2DD-80BB932F6E8C}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{4CE6C864-DB4D-4262-A2DD-80BB932F6E8C}.Debug|x64.ActiveCfg = Debug|Any CPU
{4CE6C864-DB4D-4262-A2DD-80BB932F6E8C}.Debug|x64.Build.0 = Debug|Any CPU
{4CE6C864-DB4D-4262-A2DD-80BB932F6E8C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4CE6C864-DB4D-4262-A2DD-80BB932F6E8C}.Release|Any CPU.Build.0 = Release|Any CPU
{4CE6C864-DB4D-4262-A2DD-80BB932F6E8C}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{4CE6C864-DB4D-4262-A2DD-80BB932F6E8C}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{4CE6C864-DB4D-4262-A2DD-80BB932F6E8C}.Release|x64.ActiveCfg = Release|Any CPU
{4CE6C864-DB4D-4262-A2DD-80BB932F6E8C}.Release|x64.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand All @@ -375,8 +417,11 @@ Global
{F009209D-A663-45E1-87E8-158569A0F097} = {F1C83FD9-A498-483E-ADFA-B55D82A14965}
{F81A7CA6-97D4-4958-A9C1-FF94FCA283CB} = {C86C6DEE-84E1-4E4E-8868-6755D7A8E0E4}
{7E6903A4-DBE1-444E-A8E3-C1DBB58243E0} = {C86C6DEE-84E1-4E4E-8868-6755D7A8E0E4}
{5ABE8807-2209-4948-9FC5-1980A507C47A} = {C86C6DEE-84E1-4E4E-8868-6755D7A8E0E4}
{C3F9A738-9759-4B2B-A50D-6507B28A659B} = {5DE01C58-D5F7-482F-8256-A8333064384C}
{296703A3-67BA-4876-8C1D-ACE13DF901EF} = {F1C83FD9-A498-483E-ADFA-B55D82A14965}
{CCB4D5EF-AC84-449D-AC6E-0A0AD295483A} = {F1C83FD9-A498-483E-ADFA-B55D82A14965}
{4CE6C864-DB4D-4262-A2DD-80BB932F6E8C} = {C86C6DEE-84E1-4E4E-8868-6755D7A8E0E4}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {D3AB83E9-02B4-4FFA-A2D0-637F0B97E626}
Expand Down
8 changes: 6 additions & 2 deletions build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,9 @@ Invoke-BuildStep 'Set version metadata in AssemblyInfo.cs' {
"src\NuGet.Jobs.Catalog2AzureSearch\Properties\AssemblyInfo.g.cs", `
"src\NuGet.Jobs.Owners2AzureSearch\Properties\AssemblyInfo.g.cs", `
"src\NuGet.Services.SearchService\Properties\AssemblyInfo.g.cs", `
"src\NuGet.Jobs.Auxiliary2AzureSearch\Properties\AssemblyInfo.g.cs"
"src\NuGet.Jobs.Auxiliary2AzureSearch\Properties\AssemblyInfo.g.cs", `
"src\NuGet.Jobs.Catalog2Registration\Properties\AssemblyInfo.g.cs", `
"src\NuGet.Jobs.RegistrationComparer\Properties\AssemblyInfo.g.cs"

Foreach ($assemblyInfo in $assemblyInfos) {
Set-VersionInfo -Path (Join-Path $PSScriptRoot $assemblyInfo) -Version $SimpleVersion -Branch $Branch -Commit $CommitSHA
Expand Down Expand Up @@ -138,7 +140,9 @@ Invoke-BuildStep 'Creating artifacts' {
"src\NuGet.Jobs.Db2AzureSearch\NuGet.Jobs.Db2AzureSearch.nuspec", `
"src\NuGet.Jobs.Catalog2AzureSearch\NuGet.Jobs.Catalog2AzureSearch.nuspec", `
"src\NuGet.Jobs.Owners2AzureSearch\NuGet.Jobs.Owners2AzureSearch.nuspec", `
"src\NuGet.Jobs.Auxiliary2AzureSearch\NuGet.Jobs.Auxiliary2AzureSearch.nuspec"
"src\NuGet.Jobs.Auxiliary2AzureSearch\NuGet.Jobs.Auxiliary2AzureSearch.nuspec", `
"src\NuGet.Jobs.Catalog2Registration\NuGet.Jobs.Catalog2Registration.nuspec", `
"src\NuGet.Jobs.RegistrationComparer\NuGet.Jobs.RegistrationComparer.nuspec"

$nuspecPackages | ForEach-Object {
New-Package (Join-Path $PSScriptRoot $_) -Configuration $Configuration -BuildNumber $BuildNumber -Version $SemanticVersion -Branch $Branch
Expand Down
3 changes: 2 additions & 1 deletion src/Catalog/context/PackageDetails.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"dependencies" : { "@id" : "dependency", "@container" : "@set" },
"dependencyGroups" : { "@id" : "dependencyGroup", "@container" : "@set" },
"packageEntries": { "@id": "packageEntry", "@container": "@set" },
"packageTypes": { "@id": "packageType", "@container": "@set" },
"supportedFrameworks": { "@id": "supportedFramework", "@container": "@set" },
"tags": { "@id": "tag", "@container": "@set" },
"published": { "@type": "xsd:dateTime" },
Expand All @@ -14,4 +15,4 @@
"catalog:commitTimeStamp" : { "@type" : "xsd:dateTime" },
"reasons" : { "@container" : "@set" }
}
}
}
119 changes: 81 additions & 38 deletions src/Catalog/xslt/nuspec.xslt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
</xsl:template>

<xsl:template match="/nuget:package/nuget:metadata">

<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">

<ng:PackageDetails>
Expand All @@ -34,21 +34,27 @@
<xsl:value-of select="@minClientVersion" />
</ng:minClientVersion>
</xsl:if>

<xsl:for-each select="*">
<xsl:choose>
<xsl:when test="self::nuget:packageTypes">
<xsl:apply-templates select="nuget:packageType">
<xsl:with-param name="path" select="$path" />
<xsl:with-param name="parent_fragment" select="'#packageTypes'" />
</xsl:apply-templates>
</xsl:when>

<xsl:when test="self::nuget:dependencies">

<xsl:choose>

<xsl:when test="nuget:group">
<xsl:apply-templates select="nuget:group">
<xsl:with-param name="path" select="$path" />
<xsl:with-param name="parent_fragment" select="'#dependencyGroup'" />
</xsl:apply-templates>
</xsl:when>

<xsl:otherwise>
<ng:dependencyGroup>
<ng:PackageDependencyGroup>
Expand All @@ -62,9 +68,9 @@
</ng:PackageDependencyGroup>
</ng:dependencyGroup>
</xsl:otherwise>

</xsl:choose>

</xsl:when>

<xsl:when test="self::nuget:references">
Expand Down Expand Up @@ -110,7 +116,7 @@

<xsl:when test="self::nuget:owners">
</xsl:when>

<xsl:when test="self::nuget:license">
<xsl:choose>
<xsl:when test="@type='file'">
Expand Down Expand Up @@ -164,13 +170,13 @@
<xsl:value-of select="obj:IsPrerelease(.)"/>
</ng:isPrerelease>
</xsl:when>

<xsl:when test="self::nuget:frameworkAssemblies">
<xsl:apply-templates select=".">
<xsl:with-param name="path" select="$path" />
</xsl:apply-templates>
</xsl:when>

<xsl:otherwise>
<xsl:element name="{concat('ng:', local-name())}">
<xsl:value-of select="."/>
Expand Down Expand Up @@ -234,6 +240,43 @@
</ng:dependencyGroup>
</xsl:template>

<xsl:template match="nuget:packageType">
<xsl:param name="position" />
<xsl:param name="path" />
<xsl:param name="parent_fragment" />
<ng:packageType>
<ng:PackageType>

<xsl:choose>
<xsl:when test="@version">
<xsl:variable name="fragment" select="concat(normalize-space(@name), '/', normalize-space(@version))" />
<xsl:attribute name="rdf:about">
<xsl:value-of select="concat(obj:LowerCase(concat($base, $path, $extension, $parent_fragment, '/')), $fragment)" />
</xsl:attribute>
</xsl:when>
<xsl:otherwise>
<xsl:attribute name="rdf:about">
<xsl:value-of select="concat(obj:LowerCase(concat($base, $path, $extension, $parent_fragment, '/')), normalize-space(@name))" />
</xsl:attribute>
</xsl:otherwise>
</xsl:choose>

<xsl:if test="@name">
<ng:name>
<xsl:value-of select="normalize-space(@name)"/>
</ng:name>
</xsl:if>

<xsl:if test="@version">
<ng:version>
<xsl:value-of select="normalize-space(@version)" />
</ng:version>
</xsl:if>

</ng:PackageType>
</ng:packageType>
</xsl:template>

<xsl:template match="nuget:dependency">
<xsl:param name="path" />
<xsl:param name="parent_fragment" />
Expand All @@ -246,9 +289,9 @@
<xsl:attribute name="rdf:about">
<xsl:value-of select="obj:LowerCase(concat($base, $path, $extension, $fragment))" />
</xsl:attribute>

<ng:id>
<xsl:value-of select="@id"/>
<xsl:value-of select="@id"/>
</ng:id>

<ng:range>
Expand Down Expand Up @@ -290,39 +333,39 @@
<xsl:template match="nuget:frameworkAssembly">
<xsl:param name="path" />

<xsl:choose>
<xsl:when test="string-length(@targetFramework) &gt; 0">
<xsl:variable name="assemblyName" select="@assemblyName" />
<xsl:for-each select="obj:Split(@targetFramework)//item">
<ng:frameworkAssemblyGroup>
<rdf:Description>
<xsl:attribute name="rdf:about">
<xsl:value-of select="obj:LowerCase(concat($base, $path, $extension, '#frameworkAssemblyGroup/', .))"/>
</xsl:attribute>
<ng:assembly>
<xsl:value-of select="$assemblyName" />
</ng:assembly>
<ng:targetFramework>
<xsl:value-of select="." />
</ng:targetFramework>
</rdf:Description>
</ng:frameworkAssemblyGroup>
</xsl:for-each>
</xsl:when>
<xsl:otherwise>
<xsl:choose>
<xsl:when test="string-length(@targetFramework) &gt; 0">
<xsl:variable name="assemblyName" select="@assemblyName" />
<xsl:for-each select="obj:Split(@targetFramework)//item">
<ng:frameworkAssemblyGroup>
<rdf:Description>
<xsl:attribute name="rdf:about">
<xsl:value-of select="obj:LowerCase(concat($base, $path, $extension, '#frameworkAssemblyGroup'))"/>
<xsl:value-of select="obj:LowerCase(concat($base, $path, $extension, '#frameworkAssemblyGroup/', .))"/>
</xsl:attribute>
<ng:assembly>
<xsl:value-of select="@assemblyName" />
<xsl:value-of select="$assemblyName" />
</ng:assembly>
<ng:targetFramework>
<xsl:value-of select="." />
</ng:targetFramework>
</rdf:Description>
</ng:frameworkAssemblyGroup>
</xsl:otherwise>
</xsl:choose>

</xsl:for-each>
</xsl:when>
<xsl:otherwise>
<ng:frameworkAssemblyGroup>
<rdf:Description>
<xsl:attribute name="rdf:about">
<xsl:value-of select="obj:LowerCase(concat($base, $path, $extension, '#frameworkAssemblyGroup'))"/>
</xsl:attribute>
<ng:assembly>
<xsl:value-of select="@assemblyName" />
</ng:assembly>
</rdf:Description>
</ng:frameworkAssemblyGroup>
</xsl:otherwise>
</xsl:choose>

</xsl:template>

</xsl:stylesheet>
6 changes: 6 additions & 0 deletions src/NuGet.Jobs.Catalog2Registration/App.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2"/>
</startup>
</configuration>
Loading

0 comments on commit 7378476

Please sign in to comment.