Skip to content

Commit 28dd71e

Browse files
committed
fix: make sure homebrew-core is up to date
1 parent b6b181d commit 28dd71e

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

ci/steps/brew-bump.sh

+27
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,36 @@ main() {
55
cd "$(dirname "$0")/../.."
66
# Only sourcing this so we get access to $VERSION
77
source ./ci/lib.sh
8+
9+
# NOTE: we need to make sure cdrci/homebrew-core
10+
# is up-to-date
11+
# otherwise, brew bump-formula-pr will use an
12+
# outdated base
13+
echo "Cloning cdrci/homebrew-core"
14+
git clone https://github.com/cdrci/homebrew-core.git
15+
16+
echo "Changing into homebrew-core directory"
17+
cd homebrew-core && pwd
18+
19+
echo "Adding Homebrew/homebrew-core as `upstream`"
20+
git remote add upstream https://github.com/Homebrew/homebrew-core.git
21+
22+
echo "Fetching upstream commits..."
23+
git fetch upstream
24+
25+
echo "Merging in latest changes"
26+
git merge upstream/master
27+
28+
echo "Pushing changes to cdrci/homebrew-core fork on GitHub"
29+
git push origin master
30+
831
# Find the docs for bump-formula-pr here
932
# https://github.com/Homebrew/brew/blob/master/Library/Homebrew/dev-cmd/bump-formula-pr.rb#L18
1033
brew bump-formula-pr --force --version="${VERSION}" code-server --no-browse --no-audit
34+
35+
# Clean up and remove homebrew-core
36+
cd ..
37+
rm -rf homebrew-core
1138
}
1239

1340
main "$@"

0 commit comments

Comments
 (0)