Merge pull request #15241 from colindean/add-size-to-ghp-manifest

Add bottle file size to GHP manifest annotations
This commit is contained in:
Mike McQuaid 2023-04-17 12:17:53 +01:00 committed by GitHub
commit 7b32e6e9af
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -356,11 +356,14 @@ class GitHubPackages
documentation = "https://formulae.brew.sh/formula/#{formula_name}" if formula_core_tap
local_file_size = File.size(local_file)
descriptor_annotations_hash = {
"org.opencontainers.image.ref.name" => tag,
"sh.brew.bottle.cpu.variant" => cpu_variant,
"sh.brew.bottle.digest" => tar_gz_sha256,
"sh.brew.bottle.glibc.version" => glibc_version,
"sh.brew.bottle.size" => local_file_size,
"sh.brew.tab" => tab.to_json,
}.reject { |_, v| v.blank? }