From d7610135f0cdf2dbfd8f61e8a4dcd371d0dd1126 Mon Sep 17 00:00:00 2001 From: southerntofu Date: Mon, 5 Oct 2020 17:30:50 +0200 Subject: [PATCH] Ensure trigger by source URL works as expected --- forgebuild.sh | 9 +++++---- spec | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/forgebuild.sh b/forgebuild.sh index a3ca149..60b6990 100755 --- a/forgebuild.sh +++ b/forgebuild.sh @@ -250,18 +250,19 @@ for arg in "$@"; do debug found_task PROJECTS+=("$arg") # Maybe it's a repo URL and we find a corresponding task? - # TODO: maybe remove this? multiple URLs can point to the same repo so.. + # Used for interop (for example forgehook-notify) elif matches="$(grep --files-with-matches --word-regexp "$arg" $BASEDIR/*.source)"; then # Iterate over the files found to extract the task name - IFS= echo "$matches" | while read -r file; do + while IFS= read -r file; do task_name="$(basename "$file" .source)" # Make sure we don't have a .source file without name lying around, just in case if [[ "$task_name" != "" ]]; then export i18n_task="$task_name" i18n_source="$arg" debug found_url - PROJECT+=("$task_name") + echo "FOUND $task_name" + PROJECTS+=("$task_name") fi - done + done <<< "$matches" else export i18n_arg="$arg" error unknown_arg diff --git a/spec b/spec index aaa2d8b..977a20d 160000 --- a/spec +++ b/spec @@ -1 +1 @@ -Subproject commit aaa2d8bd7252db92930e9e3469522b6d82392d36 +Subproject commit 977a20da88d42f1c9b00151ab20c4b26bca1d75b