github_packages: Rename sh.brew.bottle.digest

Rename sh.brew.bottle.checksum to sh.brew.bottle.digest
for consistency with the OCI descriptor spec.
This commit is contained in:
Shaun Jackman 2021-04-02 10:13:27 +01:00 committed by Mike McQuaid
parent d578469a75
commit 3141d493ca
No known key found for this signature in database
GPG Key ID: 48A898132FD8EE70
2 changed files with 3 additions and 3 deletions

View File

@ -287,7 +287,7 @@ class GitHubPackages
platform: platform_hash,
annotations: {
"org.opencontainers.image.ref.name" => tag,
"sh.brew.bottle.checksum" => tar_gz_sha256,
"sh.brew.bottle.digest" => tar_gz_sha256,
"sh.brew.tab" => tab.to_json,
},
}

View File

@ -370,9 +370,9 @@ class Bottle
manifests_annotations = manifests.map { |m| m["annotations"] }
raise ArgumentError, "Missing 'annotations' section." if manifests_annotations.blank?
bottle_checksum = @resource.checksum.hexdigest
bottle_digest = @resource.checksum.hexdigest
manifest_annotations = manifests_annotations.find do |m|
m["sh.brew.bottle.checksum"] == bottle_checksum
m["sh.brew.bottle.digest"] == bottle_digest
end
raise ArgumentError, "Couldn't find manifest matching bottle checksum." if manifest_annotations.blank?