1
0
mirror of https://github.com/tektoncd/catalog.git synced 2024-11-21 05:55:35 +00:00

Fix e2e script to detect any file change

e2e script was unable to detect the changes in the `pre-apply-task-hook.sh` file(if any)
and was checking only file changes in YAML files. Fixed!

Signed-off-by: vinamra28 <vinjain@redhat.com>
This commit is contained in:
vinamra28 2020-12-22 13:09:43 +05:30 committed by tekton-robot
parent 74eb6d0289
commit 6e8b819734

View File

@ -61,7 +61,7 @@ all_tests=$(echo task/*/*/tests)
function detect_new_changed_tasks() {
# detect for changes in tests dir of the task
git --no-pager diff --name-only "${PULL_BASE_SHA}".."${PULL_PULL_SHA}"|grep 'task/[^\/]*/[^\/]*/tests/[^/]*.yaml'|xargs -I {} dirname {}
git --no-pager diff --name-only "${PULL_BASE_SHA}".."${PULL_PULL_SHA}"|grep 'task/[^\/]*/[^\/]*/tests/[^/]*'|xargs -I {} dirname {}
# detect for changes in the task manifest
git --no-pager diff --name-only "${PULL_BASE_SHA}".."${PULL_PULL_SHA}"|grep 'task/[^\/]*/[^\/]*/*[^/]*.yaml'|xargs -I {} dirname {}|awk '{print $1"/tests"}'
}