Skip to content

Commit

Permalink
#842 add in properties for metadata etc
Browse files Browse the repository at this point in the history
Signed-off-by: James Thompson <[email protected]>
  • Loading branch information
thompson-tomo committed Jan 30, 2024
1 parent 0636839 commit 6aedc89
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion CycloneDX/Services/NugetV3Service.cs
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ private static Component SetupComponentProperties(Component component, NuspecMod
{
component.Publisher = component.Author;
}

var releaseNoteType = "internal";
var version = nuspecModel.nuspecReader.GetVersion();
if (version.IsPrerelease)
Expand Down Expand Up @@ -344,6 +344,25 @@ private static Component SetupComponentProperties(Component component, NuspecMod
}
]
};

var properties = nuspecModel.nuspecReader.GetMetadata()
.Select(x => new Property()
{
Name = x.Key,
Value = x.Value
})
.ToList();
properties.Add(new Property()
{
Name = "tags",
Value = nuspecModel.nuspecReader.GetTags(),
});
properties.Add(new Property()
{
Name = "language",
Value = nuspecModel.nuspecReader.GetLanguage()
});
component.Properties = properties;
return component;
}

Expand Down

0 comments on commit 6aedc89

Please sign in to comment.