changed_file_names: using the git repository path as serach criterion

This commit is contained in:
Gerhard Hoffmann 2022-06-05 19:23:43 +02:00
parent 0ee446dcc0
commit b9caeb2e3c

View File

@ -139,16 +139,17 @@ cd_home () {
pull_customer_repository () {
local func="${FUNCNAME[0]}"
if ! cd_customer_repository ; then
if ! cd_customer_repository; then
return 1
fi
local commit_before_pull=$(latest_commit)
if [ -z $commit_before_pull ]; then
log_warn "$func:${LINENO}: commit_before_pull empty"
cd_home ; return 1
fi
log_debug "$func:${LINENO}: commit_before_pull=$commit_before_pull"
log_debug "$func:${LINENO}: executing 'git pull'..."
local git_result=$(exec_git_command 'git pull')
@ -256,12 +257,13 @@ changed_file_names () {
log_debug "$func:${LINENO}: git_res=$git_res"
local file_names=""
for f in ${KNOWN_FILES[@]} ; do
if grep -qE ".*\s+${f}\s+.*" <<< $git_res; then
if grep -qE "${f}" <<< "$git_res"; then
if ! [ -z $file_names ]; then
file_names="$f $file_names"
else
file_names="$f"
fi
log_debug "$func:${LINENO}: $f found in $git_res"
fi
done