Skip to content

Commit

Permalink
ci: Make portlist a string not an array
Browse files Browse the repository at this point in the history
There does not seem to be any need to treat portlist as an array in this
step since we only ever get the entire array here, and in subsequent
steps we already treat it as string. Getting the entire array fails if
there are no elements (i.e. if the commit only modified files that are
not port files).

See: https://trac.macports.org/ticket/62071
  • Loading branch information
ryandesign authored and neverpanic committed Feb 27, 2023
1 parent f3efbc9 commit 99d7736
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,15 @@ jobs:
echo "/opt/local/bin" >> $GITHUB_PATH
echo "/opt/local/sbin" >> $GITHUB_PATH
IFS='/' read -r -a portlist <<<$( \
portlist=$( \
git -C ports/ diff --name-only --diff-filter=AM macports/master...@ \
| sed -En 's,^[^._/][^/]*/([^/]+)/(Portfile$|files/),\1,p' \
| sort -u \
| tr '\n' '/')
| tr '\n' ' ' \
| sed 's/ $//')
echo "${portlist[@]}"
echo "portlist=${portlist[@]}" >> $GITHUB_OUTPUT
echo "$portlist"
echo "portlist=$portlist" >> $GITHUB_OUTPUT
- name: Determine list of subports from portlist
id: subportlist
Expand Down

0 comments on commit 99d7736

Please sign in to comment.