github_packages: Fix org.opencontainers.image.source

This commit is contained in:
Mike McQuaid 2021-03-31 09:21:18 +01:00
parent fe5e8b820a
commit 5818b7871d
No known key found for this signature in database
GPG Key ID: 48A898132FD8EE70

View File

@ -123,6 +123,7 @@ class GitHubPackages
formula_name = bottle_hash["formula"]["name"] formula_name = bottle_hash["formula"]["name"]
_, org, repo, = *bottle_hash["bottle"]["root_url"].match(URL_REGEX) _, org, repo, = *bottle_hash["bottle"]["root_url"].match(URL_REGEX)
repo = "homebrew-#{repo}" unless HOMEBREW_OFFICIAL_REPO_PREFIXES_REGEX.match?(repo)
version = bottle_hash["formula"]["pkg_version"] version = bottle_hash["formula"]["pkg_version"]
rebuild = if (rebuild = bottle_hash["bottle"]["rebuild"]).positive? rebuild = if (rebuild = bottle_hash["bottle"]["rebuild"]).positive?
@ -139,8 +140,7 @@ class GitHubPackages
git_path = bottle_hash["formula"]["tap_git_path"] git_path = bottle_hash["formula"]["tap_git_path"]
git_revision = bottle_hash["formula"]["tap_git_revision"] git_revision = bottle_hash["formula"]["tap_git_revision"]
git_revision ||= "HEAD" source = "https://github.com/#{org}/#{repo}/blob/#{git_revision.presence || "HEAD"}/#{git_path}"
source = "https://github.com/#{org}/#{repo}/blob/#{git_revision}/#{git_path}"
formula_core_tap = formula_full_name.exclude?("/") formula_core_tap = formula_full_name.exclude?("/")
documentation = if formula_core_tap documentation = if formula_core_tap