Use non-cask commands where possible. (#92998)
This commit is contained in:
parent
ba9c4d17ba
commit
bb73c281e8
|
@ -52,7 +52,7 @@ jobs:
|
|||
|
||||
- name: Clean up CI machine
|
||||
run: |
|
||||
if ! brew cask ls visual-studio &>/dev/null; then
|
||||
if ! brew list --cask visual-studio &>/dev/null; then
|
||||
if ! rm -r '/Applications/Visual Studio.app'; then
|
||||
echo '::warning::Removing Visual Studio is no longer necessary.'
|
||||
fi
|
||||
|
@ -108,9 +108,9 @@ jobs:
|
|||
run: brew style '${{ matrix.cask.path || matrix.tap }}'
|
||||
if: always() && steps.gems.outcome == 'success' && !matrix.cask
|
||||
|
||||
- name: Run brew cask audit ${{ matrix.cask.token || matrix.tap }}
|
||||
- name: Run brew audit --cask${{ matrix.tap && ' --tap' }} ${{ matrix.cask.token || matrix.tap }}
|
||||
run: |
|
||||
brew cask audit ${{ join(matrix.audit_args, ' ') }} '${{ matrix.cask.path || matrix.tap }}'
|
||||
brew audit --cask ${{ join(matrix.audit_args, ' ') }}${{ matrix.tap && ' --tap' }} '${{ matrix.cask.path || matrix.tap }}'
|
||||
timeout-minutes: 30
|
||||
if: always() && steps.gems.outcome == 'success' && !matrix.skip_audit
|
||||
|
||||
|
@ -155,19 +155,19 @@ jobs:
|
|||
|
||||
- name: Uninstall conflicting formulae
|
||||
run: |
|
||||
brew uninstall ${{ join(fromJSON(steps.info.outputs.formula_conflicts), ' ') }}
|
||||
brew uninstall --formula ${{ join(fromJSON(steps.info.outputs.formula_conflicts), ' ') }}
|
||||
if: always() && steps.info.outcome == 'success' && join(fromJSON(steps.info.outputs.formula_conflicts)) != ''
|
||||
timeout-minutes: 30
|
||||
|
||||
- name: Uninstall conflicting casks
|
||||
run: |
|
||||
brew cask uninstall ${{ join(fromJSON(steps.info.outputs.cask_conflicts), ' ') }}
|
||||
brew uninstall --cask ${{ join(fromJSON(steps.info.outputs.cask_conflicts), ' ') }}
|
||||
if: always() && steps.info.outcome == 'success' && join(fromJSON(steps.info.outputs.cask_conflicts)) != ''
|
||||
timeout-minutes: 30
|
||||
|
||||
- name: Run brew cask zap ${{ matrix.cask.token }}
|
||||
- name: Run brew uninstall --cask --zap ${{ matrix.cask.token }}
|
||||
run: |
|
||||
brew cask zap '${{ matrix.cask.path }}'
|
||||
brew uninstall --cask --zap '${{ matrix.cask.path }}'
|
||||
if: always() && steps.info.outcome == 'success' && fromJSON(steps.info.outputs.was_installed)
|
||||
timeout-minutes: 30
|
||||
|
||||
|
@ -179,29 +179,29 @@ jobs:
|
|||
EOF
|
||||
if: always() && steps.info.outcome == 'success'
|
||||
|
||||
- name: Run brew cask install ${{ matrix.cask.token }}
|
||||
- name: Run brew install --cask ${{ matrix.cask.token }}
|
||||
id: install
|
||||
run: brew cask install '${{ matrix.cask.path }}'
|
||||
run: brew install --cask '${{ matrix.cask.path }}'
|
||||
if: >
|
||||
always() && steps.info.outcome == 'success' &&
|
||||
fromJSON(steps.info.outputs.macos_requirement_satisfied) &&
|
||||
!matrix.skip_install
|
||||
timeout-minutes: 30
|
||||
|
||||
- name: Run brew cask uninstall ${{ matrix.cask.token }}
|
||||
run: brew cask uninstall '${{ matrix.cask.path }}'
|
||||
- name: Run brew uninstall --cask ${{ matrix.cask.token }}
|
||||
run: brew uninstall --cask '${{ matrix.cask.path }}'
|
||||
if: always() && steps.install.outcome == 'success' && !fromJSON(steps.info.outputs.manual_installer)
|
||||
timeout-minutes: 30
|
||||
|
||||
- name: Uninstall formula dependencies
|
||||
run: |
|
||||
brew uninstall ${{ join(fromJSON(steps.info.outputs.formula_dependencies), ' ') }}
|
||||
brew uninstall --formula ${{ join(fromJSON(steps.info.outputs.formula_dependencies), ' ') }}
|
||||
if: always() && steps.install.outcome == 'success' && join(fromJSON(steps.info.outputs.formula_dependencies)) != ''
|
||||
timeout-minutes: 30
|
||||
|
||||
- name: Uninstall cask dependencies
|
||||
run: |
|
||||
brew cask uninstall ${{ join(fromJSON(steps.info.outputs.cask_dependencies), ' ') }}
|
||||
brew uninstall --cask ${{ join(fromJSON(steps.info.outputs.cask_dependencies), ' ') }}
|
||||
if: always() && steps.install.outcome == 'success' && join(fromJSON(steps.info.outputs.cask_dependencies)) != ''
|
||||
timeout-minutes: 30
|
||||
|
||||
|
|
|
@ -39,7 +39,7 @@ module CiMatrix
|
|||
"--appcast"
|
||||
end
|
||||
|
||||
audit_args = ["--download", appcast_arg, "--online"]
|
||||
audit_args = [appcast_arg, "--online"]
|
||||
|
||||
audit_args << "--new-cask" if changed_files[:added_files].include?(path)
|
||||
|
||||
|
|
Loading…
Reference in New Issue