repair regex condition
This commit is contained in:
parent
399caa007c
commit
5578845e3f
@ -796,9 +796,8 @@ module Homebrew
|
|||||||
|
|
||||||
problem "#{stable.version} is a development release"
|
problem "#{stable.version} is a development release"
|
||||||
when %r{^https://github.com/}
|
when %r{^https://github.com/}
|
||||||
matches = stable.url.match(%r{https://github.com/(.*)/.*/(releases/download/(.*)/.*tar.gz|archive/(.*).tar.gz)})
|
owner = stable.url.match(%r{https://github.com/(.*?)(/)})[1]
|
||||||
owner = matches[1]
|
tag = stable.url.match(%r{https://github.com/.*(download|archive)/(\D*(\d*.){2}\d*)})[2]
|
||||||
tag = matches[3] || matches[4]
|
|
||||||
begin
|
begin
|
||||||
if GitHub.open_api("#{GitHub::API_URL}/repos/#{owner}/#{stable.full_name}/releases/tags/#{tag}")\
|
if GitHub.open_api("#{GitHub::API_URL}/repos/#{owner}/#{stable.full_name}/releases/tags/#{tag}")\
|
||||||
["prerelease"]
|
["prerelease"]
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user