Skip to content

Commit

Permalink
Set SemVerLevelKey after setting Dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
xavierdecoster committed May 16, 2017
1 parent 52152db commit 0d2a4e5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/NuGetGallery/Services/PackageService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -546,10 +546,7 @@ public virtual Package EnrichPackageFromNuGetPackage(
// However, we do also store a normalized copy for looking up later.
package.Version = packageMetadata.Version.OriginalVersion;
package.NormalizedVersion = packageMetadata.Version.ToNormalizedString();

// Identify the SemVerLevelKey using the original package version string and package dependencies
package.SemVerLevelKey = SemVerLevelKey.ForPackage(packageMetadata.Version, package.Dependencies);


package.Description = packageMetadata.Description;
package.ReleaseNotes = packageMetadata.ReleaseNotes;
package.HashAlgorithm = packageStreamMetadata.HashAlgorithm;
Expand Down Expand Up @@ -609,6 +606,9 @@ public virtual Package EnrichPackageFromNuGetPackage(
package.FlattenedDependencies = package.Dependencies.Flatten();

package.FlattenedPackageTypes = package.PackageTypes.Flatten();

// Identify the SemVerLevelKey using the original package version string and package dependencies
package.SemVerLevelKey = SemVerLevelKey.ForPackage(packageMetadata.Version, package.Dependencies);

return package;
}
Expand Down

0 comments on commit 0d2a4e5

Please sign in to comment.