Skip to content

Commit

Permalink
Tweaked the additional properties
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 58974c0 commit d06386a
Showing 1 changed file with 33 additions and 11 deletions.
44 changes: 33 additions & 11 deletions CycloneDX/Services/NugetV3Service.cs
Original file line number Diff line number Diff line change
Expand Up @@ -346,18 +346,40 @@ 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()
var properties = new List<Property>()
{
Name = "language",
Value = nuspecModel.nuspecReader.GetLanguage()
});
new Property()
{
Name = "language",
Value = nuspecModel.nuspecReader.GetLanguage()
},
new Property()
{
Name = "minclientVersion",
Value = nuspecModel.nuspecReader.GetMinClientVersion().Version.ToString(),
},
new Property()
{
Name = "gitBranch",
Value = nuspecModel.nuspecReader.GetRepositoryMetadata().Branch
},
new Property()
{
Name = "gitCommit",
Value = nuspecModel.nuspecReader.GetRepositoryMetadata().Commit
},
new Property()
{
Name = "gitRepositoryType",
Value = nuspecModel.nuspecReader.GetRepositoryMetadata().Type
},
new Property()
{
Name = "licenceAcceptanceRequired",
Value = nuspecModel.nuspecReader.GetRequireLicenseAcceptance().ToString()
}

};
component.Properties = properties;
return component;
}
Expand Down

0 comments on commit d06386a

Please sign in to comment.