Add stable checksum to the JSON API

This commit is contained in:
Rylan Polster 2022-10-21 01:22:36 -04:00
parent 2bec760529
commit cc78b155c6
No known key found for this signature in database
GPG Key ID: 46A744940CFF4D64
2 changed files with 2 additions and 0 deletions

View File

@ -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?

View File

@ -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