pypi: support updating resources for git clones

This commit is contained in:
Branch Vincent 2023-08-05 17:01:25 -07:00
parent 3eb48a828d
commit e5ed11a5b7
No known key found for this signature in database

View File

@ -228,7 +228,13 @@ module PyPI
main_package = if package_name.present? main_package = if package_name.present?
Package.new(package_name) Package.new(package_name)
else else
Package.new(T.must(formula.stable).url, is_url: true) stable = T.must(formula.stable)
url = if stable.specs[:tag].present?
url = "git+#{stable.url}@#{stable.specs[:tag]}"
else
stable.url
end
Package.new(url, is_url: true)
end end
if version.present? if version.present?