Skip to content

fix(ci): update brew-bump.sh to update remote first #3438

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 21, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
fix: make sure homebrew-core is up to date
  • Loading branch information
jsjoeio committed May 21, 2021
commit ed0ddeaf3e1a7b7cafb4a721fa19988cff9611d7
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ VS Code v1.56.1

### Development

- fix(ci): update brew-bump.sh to update remote first #0000 @jsjoeio
- fix(ci): update brew-bump.sh to update remote first #3438 @jsjoeio

## 3.10.1

Expand Down
27 changes: 27 additions & 0 deletions ci/steps/brew-bump.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,36 @@ main() {
cd "$(dirname "$0")/../.."
# Only sourcing this so we get access to $VERSION
source ./ci/lib.sh

# NOTE: we need to make sure cdrci/homebrew-core
# is up-to-date
# otherwise, brew bump-formula-pr will use an
# outdated base
echo "Cloning cdrci/homebrew-core"
git clone https://github.com/cdrci/homebrew-core.git

echo "Changing into homebrew-core directory"
cd homebrew-core && pwd

echo "Adding Homebrew/homebrew-core as $(upstream)"
git remote add upstream https://github.com/Homebrew/homebrew-core.git

echo "Fetching upstream commits..."
git fetch upstream

echo "Merging in latest changes"
git merge upstream/master

echo "Pushing changes to cdrci/homebrew-core fork on GitHub"
git push origin master

# Find the docs for bump-formula-pr here
# https://github.com/Homebrew/brew/blob/master/Library/Homebrew/dev-cmd/bump-formula-pr.rb#L18
brew bump-formula-pr --force --version="${VERSION}" code-server --no-browse --no-audit

# Clean up and remove homebrew-core
cd ..
rm -rf homebrew-core
}

main "$@"