From cc78b155c6f1ced33b864f21613f29b235ca1c7a Mon Sep 17 00:00:00 2001 From: Rylan Polster Date: Fri, 21 Oct 2022 01:22:36 -0400 Subject: [PATCH] Add stable checksum to the JSON API --- Library/Homebrew/formula.rb | 1 + Library/Homebrew/formulary.rb | 1 + 2 files changed, 2 insertions(+) diff --git a/Library/Homebrew/formula.rb b/Library/Homebrew/formula.rb index a0919625fb..b5e716082e 100644 --- a/Library/Homebrew/formula.rb +++ b/Library/Homebrew/formula.rb @@ -2107,6 +2107,7 @@ class Formula "url" => stable.url, "tag" => stable.specs[:tag], "revision" => stable.specs[:revision], + "checksum" => stable.checksum&.to_s, } hsh["bottle"]["stable"] = bottle_hash if bottle_defined? diff --git a/Library/Homebrew/formulary.rb b/Library/Homebrew/formulary.rb index c7d6a1adeb..1578174fba 100644 --- a/Library/Homebrew/formulary.rb +++ b/Library/Homebrew/formulary.rb @@ -159,6 +159,7 @@ module Formulary stable do url urls_stable["url"] version json_formula["versions"]["stable"] + sha256 urls_stable["checksum"] if urls_stable["checksum"].present? end end