Fix handling of deeply nested charts_dir (#47)
Signed-off-by: Reinhard Nägele <unguiculus@gmail.com>
This commit is contained in:
@@ -199,12 +199,8 @@ lookup_changed_charts() {
|
|||||||
local changed_files
|
local changed_files
|
||||||
changed_files=$(git diff --find-renames --name-only "$commit" -- "$charts_dir")
|
changed_files=$(git diff --find-renames --name-only "$commit" -- "$charts_dir")
|
||||||
|
|
||||||
local fields
|
local depth=$(( $(tr "/" "\n" <<< "$charts_dir" | wc -l) + 1 ))
|
||||||
if [[ "$charts_dir" == '.' ]]; then
|
local fields="1-${depth}"
|
||||||
fields='1'
|
|
||||||
else
|
|
||||||
fields='1,2'
|
|
||||||
fi
|
|
||||||
|
|
||||||
cut -d '/' -f "$fields" <<< "$changed_files" | uniq | filter_charts
|
cut -d '/' -f "$fields" <<< "$changed_files" | uniq | filter_charts
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user