Ensure trigger by source URL works as expected

This commit is contained in:
southerntofu 2020-10-05 17:30:50 +02:00
parent d36e8baad6
commit d7610135f0
2 changed files with 6 additions and 5 deletions

View File

@ -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

2
spec

@ -1 +1 @@
Subproject commit aaa2d8bd7252db92930e9e3469522b6d82392d36
Subproject commit 977a20da88d42f1c9b00151ab20c4b26bca1d75b