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