<pre style='margin:0'>
Ryan Schmidt (ryandesign) pushed a commit to branch workflows
in repository macports-ports.
</pre>
<p><a href="https://github.com/macports/macports-ports/commit/343b94e6f7354fb66be0cab1a6720258d2646389">https://github.com/macports/macports-ports/commit/343b94e6f7354fb66be0cab1a6720258d2646389</a></p>
<pre style="white-space: pre; background: #F8F8F8"><span style='display:block; white-space:pre;color:#808000;'>commit 343b94e6f7354fb66be0cab1a6720258d2646389
</span>Author: Ryan Schmidt <ryandesign@macports.org>
AuthorDate: Thu Feb 23 05:28:23 2023 -0600
<span style='display:block; white-space:pre;color:#404040;'> ci: Make portlist a string not an array
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> There does not seem to be any need to treat portlist as an array in this
</span><span style='display:block; white-space:pre;color:#404040;'> step since we only ever get the entire array here, and in subsequent
</span><span style='display:block; white-space:pre;color:#404040;'> steps we already treat it as string. Getting the entire array fails if
</span><span style='display:block; white-space:pre;color:#404040;'> there are no elements (i.e. if the commit only modified files that are
</span><span style='display:block; white-space:pre;color:#404040;'> not port files).
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> See: https://trac.macports.org/ticket/62071
</span>---
.github/workflows/main.yml | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
</span><span style='display:block; white-space:pre;color:#808080;'>index ef94c036222..52b98fa7341 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/.github/workflows/main.yml
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/.github/workflows/main.yml
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -49,14 +49,15 @@ jobs:
</span> echo "/opt/local/bin" >> $GITHUB_PATH
echo "/opt/local/sbin" >> $GITHUB_PATH
<span style='display:block; white-space:pre;background:#ffe0e0;'>- IFS='/' read -r -a portlist <<<$( \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ portlist=$( \
</span> git -C ports/ diff --name-only --diff-filter=AM macports/master...@ \
| sed -En 's,^[^._/][^/]*/([^/]+)/(Portfile$|files/),\1,p' \
| sort -u \
<span style='display:block; white-space:pre;background:#ffe0e0;'>- | tr '\n' '/')
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ | tr '\n' ' ' \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ | sed 's/ $//')
</span>
<span style='display:block; white-space:pre;background:#ffe0e0;'>- echo "${portlist[@]}"
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- echo "portlist=${portlist[@]}" >> $GITHUB_OUTPUT
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ echo "$portlist"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ echo "portlist=$portlist" >> $GITHUB_OUTPUT
</span>
- name: Determine list of subports from portlist
id: subportlist
</pre><pre style='margin:0'>
</pre>