SPDX file has duplicate sha256 tag in versionInfo (#2300)

* SPDX file has duplicate sha256 tag in versionInfo

Signed-off-by: Colm O hEigeartaigh <coheigea@apache.org>

* add tests

Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>

---------

Signed-off-by: Colm O hEigeartaigh <coheigea@apache.org>
Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>
Co-authored-by: Alex Goodman <wagoodman@users.noreply.github.com>
This commit is contained in:
Colm O hEigeartaigh
2023-11-08 22:49:31 +00:00
committed by GitHub
co-authored by Alex Goodman
parent bae5a2e741
commit dc14dbb326
2 changed files with 15 additions and 14 deletions
-4
View File
@@ -108,10 +108,6 @@ func deriveIDFromFile(cfg FileConfig) (artifact.ID, string) {
info += fmt.Sprintf(":%s@%s", cfg.Alias.Name, cfg.Alias.Version)
}
if d != "" {
d = fmt.Sprintf("sha256:%s", d)
}
return artifactIDFromDigest(digest.SHA256.FromString(info).String()), d
}