mirror of
https://github.com/wavetermdev/homebrew-cask.git
synced 2026-08-05 13:43:24 -07:00
parse_electron_builder_appcast: s3 detection when no region (#71459)
This commit is contained in:
@@ -21,12 +21,12 @@ def parse(app_path)
|
||||
when "s3"
|
||||
bucket = data["bucket"]
|
||||
channel = data["channel"]
|
||||
|
||||
return "https://#{bucket}.s3.amazon-aws.yml/#{channel}/latest-mac.yml" if channel
|
||||
|
||||
region = data["region"]
|
||||
path = data["path"].sub(%r{^/(.*)/$}, '\1')
|
||||
"https://s3-#{region}.amazonaws.com/#{bucket}/#{path}/latest-mac.yml"
|
||||
|
||||
return "https://#{bucket}.s3.amazon-aws.yml/#{channel}/latest-mac.yml" if channel
|
||||
return "https://s3-#{region}.amazonaws.com/#{bucket}/#{path}/latest-mac.yml" if region
|
||||
return "https://s3.amazonaws.com/#{bucket}/#{path}/latest-mac.yml"
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user