mirror of
https://github.com/Homebrew/brew.git
synced 2025-07-14 16:09:03 +08:00
Update sorbet
and sorbet-runtime
together.
This commit is contained in:
parent
31adc607b8
commit
49b95da14b
2
.github/dependabot.yml
vendored
2
.github/dependabot.yml
vendored
@ -16,3 +16,5 @@ updates:
|
||||
directory: /Library/Homebrew
|
||||
schedule:
|
||||
interval: daily
|
||||
ignore:
|
||||
- dependency-name: sorbet-runtime
|
||||
|
31
.github/workflows/vendor-gems.yml
vendored
31
.github/workflows/vendor-gems.yml
vendored
@ -27,26 +27,29 @@ jobs:
|
||||
with:
|
||||
username: BrewTestBot
|
||||
- name: Check out pull request
|
||||
id: checkout_pull_request
|
||||
id: checkout
|
||||
run: |
|
||||
gh pr checkout '${{ github.event.pull_request.number || github.event.inputs.pull_request }}'
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.HOMEBREW_GITHUB_API_TOKEN }}
|
||||
- name: Vendor Gems
|
||||
id: vendor
|
||||
run: |
|
||||
brew vendor-gems
|
||||
- name: Update RBI files
|
||||
id: update
|
||||
run: |
|
||||
|
||||
branch="$(git branch --show-current)"
|
||||
echo "::set-output name=branch::${branch}"
|
||||
|
||||
gem_name="$(echo "${branch}" | sed -E 's|.*/||;s|(.*)-.*$|\1|')"
|
||||
echo "::set-output name=gem_name::${gem_name}"
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.HOMEBREW_GITHUB_API_TOKEN }}
|
||||
- name: Vendor Gems
|
||||
run: |
|
||||
if [[ '${{ steps.checkout.outputs.gem_name }}' == 'sorbet' ]]; then
|
||||
brew vendor-gems --update sorbet,sorbet-runtime
|
||||
else
|
||||
brew vendor-gems
|
||||
fi
|
||||
- name: Update RBI files
|
||||
run: |
|
||||
if brew typecheck --update --fail-if-not-changed; then
|
||||
gem_name="$(echo "${branch}" | sed -E 's|.*/||;s|(.*)-.*$|\1|')"
|
||||
|
||||
if git add Library/Homebrew/sorbet; then
|
||||
git commit -m "Update RBI files for ${gem_name}."
|
||||
git commit -m "Update RBI files for ${{ steps.checkout.outputs.gem_name }}."
|
||||
fi
|
||||
|
||||
git reset --hard
|
||||
@ -55,5 +58,5 @@ jobs:
|
||||
uses: Homebrew/actions/git-try-push@master
|
||||
with:
|
||||
token: ${{ secrets.HOMEBREW_GITHUB_API_TOKEN }}
|
||||
branch: ${{ steps.update.outputs.branch }}
|
||||
branch: ${{ steps.checkout.outputs.branch }}
|
||||
force: true
|
||||
|
@ -18,13 +18,14 @@ module Homebrew
|
||||
Install and commit Homebrew's vendored gems.
|
||||
EOS
|
||||
|
||||
switch "--update",
|
||||
description: "Update all vendored Gems to the latest version."
|
||||
comma_array "--update",
|
||||
description: "Update all vendored Gems to the latest version."
|
||||
|
||||
max_named 0
|
||||
end
|
||||
end
|
||||
|
||||
sig { void }
|
||||
def vendor_gems
|
||||
args = vendor_gems_args.parse
|
||||
|
||||
@ -32,9 +33,9 @@ module Homebrew
|
||||
|
||||
ohai "cd #{HOMEBREW_LIBRARY_PATH}"
|
||||
HOMEBREW_LIBRARY_PATH.cd do
|
||||
if args.update?
|
||||
if args.update
|
||||
ohai "bundle update"
|
||||
safe_system "bundle", "update"
|
||||
safe_system "bundle", "update", *args.update
|
||||
|
||||
ohai "git add Gemfile.lock"
|
||||
system "git", "add", "Gemfile.lock"
|
||||
|
Loading…
x
Reference in New Issue
Block a user