Skip to content

Commit

Permalink
Restore brew tap before brew bump-formula-pr
Browse files Browse the repository at this point in the history
  • Loading branch information
PawelLipski committed Mar 9, 2024
1 parent 7e64491 commit e23f3e0
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 4 deletions.
4 changes: 4 additions & 0 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Release notes

## New in git-machete 3.24.2

- fixed: automatic updates of Homebrew formula

## New in git-machete 3.24.1

- fixed: deployment issues
Expand Down
12 changes: 10 additions & 2 deletions ci/homebrew/ci-deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,12 @@ sha256=$(
curl -s https://$pypi_host/pypi/git-machete/"$version"/json \
| jq --raw-output '.urls | map(select(.packagetype == "sdist")) | .[0].digests.sha256')

# We need to run `brew tap homebrew/core` manually because:
# 1. the formula files need to be present at ~/.linuxbrew/Homebrew/Library/Taps/... - otherwise, `brew bump-formula-pr` will fail due to missing formula AND
# 2. since Homebrew 4.0.0 it is no longer done by default when installing `brew`; see https://brew.sh/2023/02/16/homebrew-4.0.0/
# Also, we can't use `--shallow` here (even though it'd save us ~3 minutes), this option is no longer supported (see https://stackoverflow.com/a/65243764).
brew tap --force homebrew/core

echo "Bump Homebrew formula"
brew developer on
if [[ $do_push == true ]]; then
Expand All @@ -46,8 +52,10 @@ if [[ $do_push == true ]]; then
brew bump-formula-pr --force --no-browse --verbose --url "$url" --sha256 "$sha256" git-machete
else
echo "Refraining from push since it's a dry run"
git clone --depth=1 git@github.com:Homebrew/homebrew-core.git ~/homebrew-core
formula_file=~/homebrew-core/Formula/g/git-machete.rb
# homebrew-core has been fetched by `brew tap` above
formula_file=/home/linuxbrew/.linuxbrew/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/g/git-machete.rb

# TODO (#1198): run `brew bump-formula-pr --write-only` here, rather than patching with `sed`
sed -i "s!^ url .*\$! url \"$url\"!" $formula_file
sed -i "s!^ sha256 .*\$! sha256 \"$sha256\"!" $formula_file

Expand Down
2 changes: 1 addition & 1 deletion docs/man/git-machete.1
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
..
.TH "GIT-MACHETE" "1" "Mar 09, 2024" "" "git-machete"
.SH NAME
git-machete \- git-machete 3.24.1
git-machete \- git-machete 3.24.2
.sp
git machete is a robust tool that \fBsimplifies your git workflows\fP\&.
.sp
Expand Down
2 changes: 1 addition & 1 deletion git_machete/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '3.24.1'
__version__ = '3.24.2'

0 comments on commit e23f3e0

Please sign in to comment.