From 9057a630212d95b57e7ee5492f7662a2340ff288 Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Mon, 9 Nov 2020 09:59:59 +0000 Subject: [PATCH] dev-cmd/pr-upload: run `brew audit` before uploading. Check that `brew bottle --merge --write` hasn't broken `brew audit`. --- Library/Homebrew/dev-cmd/pr-upload.rb | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Library/Homebrew/dev-cmd/pr-upload.rb b/Library/Homebrew/dev-cmd/pr-upload.rb index 566b4e020f..99ccbab263 100644 --- a/Library/Homebrew/dev-cmd/pr-upload.rb +++ b/Library/Homebrew/dev-cmd/pr-upload.rb @@ -87,6 +87,14 @@ module Homebrew safe_system HOMEBREW_BREW_FILE, *bottle_args + # Check the bottle commits did not break `brew audit` + unless args.no_commit? + audit_args = ["bottle", "--merge", "--write"] + audit_args << "--verbose" if args.verbose? + audit_args << "--debug" if args.debug? + safe_system HOMEBREW_BREW_FILE, *audit_args + end + if github_releases?(bottles_hash) # Handle uploading to GitHub Releases. bottles_hash.each_value do |bottle_hash|