File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 5151 - name : Update formula
5252 run : |
5353 cd homebrew-devsetup
54-
55- cat > Formula/worktree-switcher.rb << 'FORMULA_EOF'
54+ cat > Formula/worktree-switcher.rb << FORMULA_EOF
5655 # typed: false
5756 # frozen_string_literal: true
5857
@@ -85,10 +84,18 @@ jobs:
8584 end
8685 end
8786 FORMULA_EOF
87+ # Remove leading whitespace from heredoc
88+ sed -i 's/^ //' Formula/worktree-switcher.rb
8889
89- - name : Commit and push formula update
90+ - name : Create PR to update formula
9091 run : |
9192 cd homebrew-devsetup
93+ BRANCH="bump-worktree-switcher-${{ steps.release.outputs.version }}"
94+ git checkout -b "$BRANCH"
9295 git add Formula/worktree-switcher.rb
93- git commit -m "chore: update worktree-switcher to ${{ steps.release.outputs.version }}" || exit 0
94- git push
96+ git commit -m "chore: update worktree-switcher to ${{ steps.release.outputs.version }}"
97+ git push -u origin "$BRANCH"
98+ gh pr create \
99+ --title "chore: update worktree-switcher to ${{ steps.release.outputs.version }}" \
100+ --body "Automated formula update from git-wt release ${{ steps.release.outputs.tag }}" \
101+ --base main
You can’t perform that action at this time.
0 commit comments