find-appcast: new case with endpoint (#80836)

This commit is contained in:
Vítor Galvão
2020-04-16 23:29:09 +01:00
committed by GitHub
parent 157eac5030
commit fa81c31a24
+2
View File
@@ -46,6 +46,7 @@ def find_electron_builder(app)
data = YAML.load_file(appcast_file)
bucket = data['bucket']
channel = data['channel']
endpoint = data['endpoint']
name = data['name']
owner = data['owner']
path = data['path']
@@ -63,6 +64,7 @@ def find_electron_builder(app)
"https://s3.amazonaws.com/#{bucket}/#{path}/latest-mac.yml",
"https://#{name}.#{region}.digitaloceanspaces.com/latest-mac.yml",
"https://#{name}.#{region}.digitaloceanspaces.com/#{path}/latest-mac.yml",
"#{endpoint}/#{bucket}/#{path}/latest-mac.yml",
].map { |appcast| appcast.gsub(%r{(?<!:)/{2,}}, '/') } # Collapse groups of two or more forward slahses into one, except when preceded by a colon
unless verify_appcast('electron-builder', *possible_appcasts)