changed_file_names: using the git repository path as serach criterion
This commit is contained in:
parent
0ee446dcc0
commit
b9caeb2e3c
@ -139,16 +139,17 @@ cd_home () {
|
|||||||
pull_customer_repository () {
|
pull_customer_repository () {
|
||||||
local func="${FUNCNAME[0]}"
|
local func="${FUNCNAME[0]}"
|
||||||
|
|
||||||
if ! cd_customer_repository ; then
|
if ! cd_customer_repository; then
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
local commit_before_pull=$(latest_commit)
|
local commit_before_pull=$(latest_commit)
|
||||||
if [ -z $commit_before_pull ]; then
|
if [ -z $commit_before_pull ]; then
|
||||||
|
log_warn "$func:${LINENO}: commit_before_pull empty"
|
||||||
cd_home ; return 1
|
cd_home ; return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
log_debug "$func:${LINENO}: commit_before_pull=$commit_before_pull"
|
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')
|
local git_result=$(exec_git_command 'git pull')
|
||||||
|
|
||||||
@ -256,12 +257,13 @@ changed_file_names () {
|
|||||||
log_debug "$func:${LINENO}: git_res=$git_res"
|
log_debug "$func:${LINENO}: git_res=$git_res"
|
||||||
local file_names=""
|
local file_names=""
|
||||||
for f in ${KNOWN_FILES[@]} ; do
|
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
|
if ! [ -z $file_names ]; then
|
||||||
file_names="$f $file_names"
|
file_names="$f $file_names"
|
||||||
else
|
else
|
||||||
file_names="$f"
|
file_names="$f"
|
||||||
fi
|
fi
|
||||||
|
log_debug "$func:${LINENO}: $f found in $git_res"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user