Skip to content

Commit

Permalink
Skip brew install --build-from-source after actual deployment (only…
Browse files Browse the repository at this point in the history
… leave in dry-run mode) (#688)
  • Loading branch information
PawelLipski authored Oct 10, 2022
1 parent b088bb6 commit 7ad28db
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 11 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.12.4

- fixed: Homebrew release process

## New in git-machete 3.12.3

- fixed: release instructions in CONTRIBUTING.md are now correct
Expand Down
20 changes: 10 additions & 10 deletions ci/homebrew/ci-deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,22 +19,22 @@ sha256=$(
curl -s https://$pypi_host/pypi/git-machete/"$version"/json \
| jq --raw-output '.urls | map(select(.packagetype == "sdist")) | .[0].digests.sha256')

git config user.email "gitmachete@virtuslab.com"
git config user.name "Git Machete Bot"
git config --global user.email "gitmachete@virtuslab.com"
git config --global user.name "Git Machete Bot"

echo "Bump homebrew formula"
if [[ $do_push == true ]]; then
brew bump-formula-pr --no-browse --verbose --url "$url" --sha256 "$sha256" git-machete
else
echo "Refraining from push since it's a dry run"
brew bump-formula-pr --write-only --no-browse --verbose --url "$url" --sha256 "$sha256" git-machete
fi

echo "Install formula locally"
brew install --build-from-source --formula /home/linuxbrew/.linuxbrew/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/git-machete.rb
if [[ "$version" != "$(git machete --version | cut -d' ' -f4)" ]]; then
echo "Something went wrong during brew installation: installed version does not match version from formula."
echo "Formula version: $version, installed version: $(git machete --version | cut -d' ' -f4)"
exit 1
echo "Install formula locally"
brew install --build-from-source --formula /home/linuxbrew/.linuxbrew/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/git-machete.rb
if [[ "$version" != "$(git machete --version | cut -d' ' -f4)" ]]; then
echo "Something went wrong during brew installation: installed version does not match version from formula."
echo "Formula version: $version, installed version: $(git machete --version | cut -d' ' -f4)"
exit 1
fi
brew remove git-machete
fi
brew remove git-machete
2 changes: 1 addition & 1 deletion git_machete/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '3.12.3'
__version__ = '3.12.4'

0 comments on commit 7ad28db

Please sign in to comment.