提交 49b95da1 编辑于 作者: Markus Reiter's avatar Markus Reiter
浏览文件

Update `sorbet` and `sorbet-runtime` together.

上级 31adc607
......@@ -16,3 +16,5 @@ updates:
directory: /Library/Homebrew
schedule:
interval: daily
ignore:
- dependency-name: sorbet-runtime
......@@ -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 }}'
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
id: vendor
run: |
brew vendor-gems
if [[ '${{ steps.checkout.outputs.gem_name }}' == 'sorbet' ]]; then
brew vendor-gems --update sorbet,sorbet-runtime
else
brew vendor-gems
fi
- name: Update RBI files
id: update
run: |
branch="$(git branch --show-current)"
echo "::set-output name=branch::${branch}"
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"
......
支持 Markdown
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册