Skip to content

Commit

Permalink
fix: use mta.yaml path for BuildPath
Browse files Browse the repository at this point in the history
  • Loading branch information
Philip Germanov committed Nov 1, 2024
1 parent b988bbd commit 318a082
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cmd/mtaBuild.go
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ func buildArtifactsMetadata(config mtaBuildOptions, commonPipelineEnvironment *m
ArtifactID: config.MtarName,
Version: config.Version,
Packaging: "mtar",
BuildPath: mtarDir,
BuildPath: getSourcePath(config),
URL: config.MtaDeploymentRepositoryURL,
PURL: piperutils.GetPurl(filepath.Join(mtarDir, "sbom-gen/bom-mta.xml")),
},
Expand Down
2 changes: 1 addition & 1 deletion cmd/mtaBuild_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,7 @@ func TestMtaBuild(t *testing.T) {
}
err := runMtaBuild(options, &cpe, utilsMock)
assert.Nil(t, err)
assert.Equal(t, cpe.custom.mtaBuildArtifacts, `{"Coordinates":[{"groupId":"dummy","artifactId":"test","version":"dummy","packaging":"mtar","buildPath":".","url":"dummydummy/test/dummy/test-dummy.mtar","purl":""}]}`)
assert.Equal(t, cpe.custom.mtaBuildArtifacts, `{"Coordinates":[{"groupId":"dummy","artifactId":"test","version":"dummy","packaging":"mtar","buildPath":"./","url":"dummydummy/test/dummy/test-dummy.mtar","purl":""}]}`)
})
})
}
Expand Down

0 comments on commit 318a082

Please sign in to comment.