🔊 Fail bottle script earlier when formula hasn't been updated

This commit is contained in:
Ben Chatelain 2021-09-08 19:08:56 -06:00 committed by Chris Araman
parent aeeb1c508e
commit ba45912f73

View file

@ -75,6 +75,13 @@ brew install --build-bottle mas
# Generate bottle do block, dropping last 2 lines
brew bottle --verbose --no-rebuild --root-url="$ROOT_URL" mas
if ! test -e "${OLD_FILENAME}"; then
echo "Bottle not found: ${OLD_FILENAME}"
echo "If an old version is showing in the log and filename, then make sure the formula has been updated in:"
echo "<BREW_HOME>/Library/Taps/homebrew/homebrew-core"
exit 1
fi
SHA256=$(shasum --algorithm 256 "${OLD_FILENAME}" | cut -f 1 -d ' ' -)
mkdir -p "$BOTTLE_DIR"