Skip to content

Commit

Permalink
Revert "Fix handling of deeply nested charts_dir (helm#47)"
Browse files Browse the repository at this point in the history
This reverts commit ee2ad4e.
  • Loading branch information
unguiculus committed Oct 30, 2020
1 parent afcbf4e commit 10505f4
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions cr.sh
Original file line number Diff line number Diff line change
Expand Up @@ -210,8 +210,12 @@ lookup_changed_charts() {
local changed_files
changed_files=$(git diff --find-renames --name-only "$commit" -- "$charts_dir")

local depth=$(( $(tr "/" "\n" <<< "$charts_dir" | wc -l) + 1 ))
local fields="1-${depth}"
local fields
if [[ "$charts_dir" == '.' ]]; then
fields='1'
else
fields='1,2'
fi

cut -d '/' -f "$fields" <<< "$changed_files" | uniq | filter_charts
}
Expand Down

0 comments on commit 10505f4

Please sign in to comment.