Skip to content

Commit

Permalink
Update HB bottle section syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
rojer committed Apr 13, 2021
1 parent d884ce1 commit 3fd653d
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions tools/update_hb.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,17 +121,18 @@ def CloneHBRepo(hb_repo, hb_repo_dir):
if len(parts) > 1 and parts[0] == "sha256":
# If it's a bottle for a version that we don't have
# but it matches the package version, keep it.
m = re.match(r'\s*sha256\s+"(\S+)"\s*=>\s*:(\S+)\s*#\s*(\S+)', l)
m = re.match(r'\s*sha256\s+.+?(\S+):\s*"(\S+)"\s*#\s*(\S+)', l)
if m:
sha, mov, v = m.groups()
mov, sha, v = m.groups()
if mov not in bottles and v == args.version:
bottles[mov] = (None, None, sha)
copy = False
elif len(parts) == 1 and parts[0] == "end":
in_bottle = False
for mac_os_version in sorted(bottles.keys()):
bottle_fname, bottle_base_name, sha256 = bottles[mac_os_version]
new_lines.append(' sha256 "%s" => :%s # %s' % (sha256, mac_os_version, args.version))
new_lines.append(' sha256 cellar: :any, %s: "%s" # %s' % (
mac_os_version, sha256, args.version))
if bottle_fname and args.bottle_upload_dest:
upload_dst = "%s/%s" % (args.bottle_upload_dest, bottle_base_name)
logging.info("Uploading %s to %s...", bottle_fname, upload_dst)
Expand Down

0 comments on commit 3fd653d

Please sign in to comment.