Formula#bottle_hash: various fixes/updates.
- remove `cellar` because it's no longer global - remove `prefix` because it's no longer customisable - add `cellar` for each bottle tag - fix `url` for GitHub Packages
This commit is contained in:
parent
6f071a06f8
commit
4633ec7bff
@ -1896,17 +1896,23 @@ class Formula
|
|||||||
bottle_spec = stable.bottle_specification
|
bottle_spec = stable.bottle_specification
|
||||||
hash = {
|
hash = {
|
||||||
"rebuild" => bottle_spec.rebuild,
|
"rebuild" => bottle_spec.rebuild,
|
||||||
"cellar" => (cellar = bottle_spec.cellar).is_a?(Symbol) ? cellar.inspect : cellar,
|
|
||||||
"prefix" => bottle_spec.prefix,
|
|
||||||
"root_url" => bottle_spec.root_url,
|
"root_url" => bottle_spec.root_url,
|
||||||
"files" => {},
|
"files" => {},
|
||||||
}
|
}
|
||||||
bottle_spec.collector.each_key do |os|
|
bottle_spec.collector.each_key do |os|
|
||||||
bottle_url = "#{bottle_spec.root_url}/#{Bottle::Filename.create(self, os, bottle_spec.rebuild).bintray}"
|
collector_os = bottle_spec.collector[os]
|
||||||
checksum = bottle_spec.collector[os][:checksum]
|
os_cellar = collector_os[:cellar]
|
||||||
|
os_cellar = os_cellar.is_a?(Symbol) ? os_cellar.inspect : os_cellar
|
||||||
|
|
||||||
|
checksum = collector_os[:checksum].hexdigest
|
||||||
|
filename = Bottle::Filename.create(self, os, bottle_spec.rebuild).bintray
|
||||||
|
path, = bottle_spec.path_resolved_basename(name, checksum, filename)
|
||||||
|
url = "#{bottle_spec.root_url}/#{path}"
|
||||||
|
|
||||||
hash["files"][os] = {
|
hash["files"][os] = {
|
||||||
"url" => bottle_url,
|
"cellar" => os_cellar,
|
||||||
"sha256" => checksum.hexdigest,
|
"url" => url,
|
||||||
|
"sha256" => checksum,
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
hash
|
hash
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user