Skip to content

Commit

Permalink
Add script to automate Homebrew formula bumps
Browse files Browse the repository at this point in the history
  • Loading branch information
ammario committed Oct 13, 2024
1 parent be9e1ef commit 48efab1
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions brew-bump.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/bash

set -e
set -x

LATEST_VERSION=$(git describe --tags --always)
echo "Latest version: ${LATEST_VERSION}"
cd /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core
ARCHIVE_URL=https://github.com/coder/aicommit/archive/refs/tags/${LATEST_VERSION}.tar.gz
ARCHIVE_SHA=$(curl -sL ${ARCHIVE_URL} | sha256sum | awk '{ print $1 }')
echo "Archive URL: ${ARCHIVE_URL}"
echo "Archive SHA: ${ARCHIVE_SHA}"
if [[ -z "${ARCHIVE_SHA}" ]]; then
echo "Archive SHA is empty"
exit 1
fi
brew bump-formula-pr --url=${ARCHIVE_URL} --sha256=${ARCHIVE_SHA} aicommit

0 comments on commit 48efab1

Please sign in to comment.