Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Blunt update of SPDX version 2.2 -> 2.2.2 #767

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions docs/sbom-tool-api-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ The `SBOMSpecification` object represents a SBOM format. Each `SBOMSpecification
```C#
using Microsoft.Sbom.Contracts;

var spdx22Specification = new SBOMSpecification("SPDX", "2.2");
var spdx22Specification = new SBOMSpecification("SPDX", "2.2.2");
```

While this API supports the creation of a SBOM output file in multiple formats, it currently only supports the SPDX version 2.2 architecture. Users looking to implement other SBOM architectures can use this API call, which provides the full list of all supported formats.
Expand All @@ -118,7 +118,7 @@ var specifications = generator.GetSupportedSBOMSpecifications();

Assert.True(specifications.Count() == 1);
Assert.Equal("SPDX", specifications.First().Name);
Assert.Equal("2.2", specifications.First().Version);
Assert.Equal("2.2.2", specifications.First().Version);
```

### GetRequiredAlgorithms
Expand Down Expand Up @@ -306,7 +306,7 @@ namespace SBOMApiExample
string outputPath = "C:/temp/ValidationOutput.json";
IList<SbomSpecification> spdx22Specification = new List<SbomSpecification>()
{
new SbomSpecification("SPDX","2.2")
new SbomSpecification("SPDX", "2.2.2")
};

RuntimeConfiguration configuration = new RuntimeConfiguration()
Expand Down
4 changes: 2 additions & 2 deletions src/Microsoft.Sbom.Api/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ namespace SBOMApiExample

IList<SBOMSpecification> specifications = new List<SBOMSpecification>()
{
new SBOMSpecification ("SPDX", "2.2")
new SBOMSpecification ("SPDX", "2.2.2")
};

RuntimeConfiguration configuration = new RuntimeConfiguration()
Expand Down Expand Up @@ -84,7 +84,7 @@ namespace SBOMApiExample
sbomFiles,
sbomPackages,
metadata,
new List<SBOMSpecification> { new("SPDX", "2.2") },
new List<SBOMSpecification> { new("SPDX", "2.2.2") },
new RuntimeConfiguration { DeleteManifestDirectoryIfPresent = true });

hostApplicationLifetime.StopApplication();
Expand Down
2 changes: 1 addition & 1 deletion src/Microsoft.Sbom.Api/Utils/Constants.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public static class Constants
public static ManifestInfo SPDX22ManifestInfo = new ManifestInfo
{
Name = "SPDX",
Version = "2.2"
Version = "2.2.2"
};

public static SbomSpecification SPDX22Specification = SPDX22ManifestInfo.ToSBOMSpecification();
Expand Down
2 changes: 1 addition & 1 deletion src/Microsoft.Sbom.Parsers.Spdx22SbomParser/Constants.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ namespace Microsoft.Sbom.Parsers.Spdx22SbomParser;
internal static class Constants
{
internal const string SPDXName = "SPDX";
internal const string SPDXVersion = "2.2";
internal const string SPDXVersion = "2.2.2";
internal const string DataLicenceValue = "CC0-1.0";
internal const string SPDXDocumentIdValue = "SPDXRef-DOCUMENT";
internal const string RootPackageIdValue = "SPDXRef-RootPackage";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,12 @@ public class ApiConfigurationBuilderTests
public void GetConfiguration_PopulateAll()
{
var specs = new List<SbomSpecification>();
specs.Add(new SbomSpecification("spdx", "2.2"));
specs.Add(new SbomSpecification("spdx", "2.2.2"));

var expectedManifestInfo = new ManifestInfo()
{
Name = "spdx",
Version = "2.2"
Version = "2.2.2"
};

var config = ApiConfigurationBuilder.GetConfiguration(RootPath, manifestDirPath, files, packages, metadata, specs, runtime, externalDocumentRefListFile, componentPath);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public class GenerateSbomE2ETests
private static string generateSbomTaskPath = Path.Combine(Directory.GetCurrentDirectory(), "Microsoft.Sbom.Targets.dll");

private static string sbomSpecificationName = "SPDX";
private static string sbomSpecificationVersion = "2.2";
private static string sbomSpecificationVersion = "2.2.2";
private static string sbomSpecificationDirectoryName = $"{sbomSpecificationName}_{sbomSpecificationVersion}".ToLowerInvariant();
private string expectedPackageName;
private string expectedVersion;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@ public class GenerateSbomTaskSPDX_2_2Tests : AbstractGenerateSbomTaskTests
{
internal override string SbomSpecificationName => "SPDX";

internal override string SbomSpecificationVersion => "2.2";
internal override string SbomSpecificationVersion => "2.2.2";
}