bump-cask-pr: support separate downloads for Intel and ARM
This commit is contained in:
parent
3c3bf1c74d
commit
5f92d00244
@ -125,10 +125,28 @@ module Homebrew
|
|||||||
tmp_config = cask.config
|
tmp_config = cask.config
|
||||||
tmp_url = tmp_cask.url.to_s
|
tmp_url = tmp_cask.url.to_s
|
||||||
|
|
||||||
if new_hash.nil? && old_hash != :no_check
|
if old_hash != :no_check
|
||||||
resource_path = fetch_resource(cask, new_version, tmp_url)
|
if new_hash.nil?
|
||||||
Utils::Tar.validate_file(resource_path)
|
resource_path = fetch_resource(cask, new_version, tmp_url)
|
||||||
new_hash = resource_path.sha256
|
Utils::Tar.validate_file(resource_path)
|
||||||
|
new_hash = resource_path.sha256
|
||||||
|
end
|
||||||
|
|
||||||
|
if tmp_contents.include?("Hardware::CPU.intel?")
|
||||||
|
other_contents = tmp_contents.gsub("Hardware::CPU.intel?", (!Hardware::CPU.intel?).to_s)
|
||||||
|
other_cask = Cask::CaskLoader.load(other_contents)
|
||||||
|
other_url = other_cask.url.to_s
|
||||||
|
other_old_hash = other_cask.sha256.to_s
|
||||||
|
|
||||||
|
resource_path = fetch_resource(cask, new_version, other_url)
|
||||||
|
Utils::Tar.validate_file(resource_path)
|
||||||
|
other_new_hash = resource_path.sha256
|
||||||
|
|
||||||
|
replacement_pairs << [
|
||||||
|
other_old_hash,
|
||||||
|
other_new_hash,
|
||||||
|
]
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
cask.languages.each do |language|
|
cask.languages.each do |language|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user