Merge pull request #10997 from sjackman/sj/bottle-digest

github_packages: Rename sh.brew.bottle.digest
This commit is contained in:
Mike McQuaid 2021-04-02 10:36:18 +01:00 committed by GitHub
commit a7d253a8a7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -287,7 +287,7 @@ class GitHubPackages
platform: platform_hash, platform: platform_hash,
annotations: { annotations: {
"org.opencontainers.image.ref.name" => tag, "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, "sh.brew.tab" => tab.to_json,
}, },
} }

View File

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