Skip to content

Commit

Permalink
fixup! workflows: install svn when brew fetch needs it
Browse files Browse the repository at this point in the history
  • Loading branch information
Moisan committed Dec 20, 2024
1 parent 0b5e527 commit c0bbadb
Showing 1 changed file with 7 additions and 13 deletions.
20 changes: 7 additions & 13 deletions .github/workflows/scheduled.yml
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,12 @@ jobs:
brew install curl
echo "HOMEBREW_FORCE_BREWED_CURL=1" >>"${GITHUB_ENV}"
- name: Install and use Homebrew svn if needed
run: |

Check failure on line 128 in .github/workflows/scheduled.yml

View workflow job for this annotation

GitHub Actions / workflow_syntax

shellcheck reported issue in this script: SC2086:info:1:100: Double quote to prevent globbing and word splitting
if brew ruby -e 'puts Formula[ARGV.first].deps.any? { |d| d.name == "subversion" && d.implicit? }' $FORMULA; then
brew install svn
fi
- name: Check formula source is not archived.
id: archived
run: brew audit --online --skip-style --only github_repository_archived,gitlab_repository_archived "$FORMULA"
Expand All @@ -149,19 +155,7 @@ jobs:
- name: Check formula for missing sources.
id: fetch
if: always() && steps.archived.conclusion != 'failure'
run: |
FETCH_OUTPUT=$(brew fetch --build-from-source "$FORMULA" 2>&1 || true)
FETCH_EXIT_CODE=$?
echo "$FETCH_OUTPUT"
if echo "$FETCH_OUTPUT" | grep -q "You must: brew install svn"; then
echo "SVN required. Installing..."
brew install svn
echo "Retrying fetch..."
brew fetch --build-from-source "$FORMULA"
elif [ $FETCH_EXIT_CODE -ne 0 ]; then
exit $FETCH_EXIT_CODE
fi
run: brew fetch --build-from-source "$FORMULA"

- name: Report fetch issues
if: failure() && steps.fetch.conclusion == 'failure'
Expand Down

0 comments on commit c0bbadb

Please sign in to comment.