Skip to content

Commit

Permalink
fix: make sure homebrew-core is up to date
Browse files Browse the repository at this point in the history
  • Loading branch information
jsjoeio committed May 21, 2021
1 parent c034243 commit ed0ddea
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 1 deletion.
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 "$@"

0 comments on commit ed0ddea

Please sign in to comment.