Skip to content

Commit

Permalink
Fixing pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
edmondop committed Aug 8, 2023
1 parent 8791dd2 commit a9fe469
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions cr.sh
Original file line number Diff line number Diff line change
Expand Up @@ -285,15 +285,21 @@ filter_charts() {
lookup_changed_charts() {
local commit="$1"

local changed_files
changed_files=$(git diff --find-renames --name-only "$commit" -- "$charts_dir")
if [ -z "$commit" ]; then
# If no commit is given (i.e., no previous tag), consider all charts.
find "$charts_dir" -maxdepth 1 -type d | filter_charts
else
local changed_files
changed_files=$(git diff --find-renames --name-only "$commit" -- "$charts_dir")

local depth=$(($(tr "/" "\n" <<<"$charts_dir" | sed '/^\(\.\)*$/d' | wc -l) + 1))
local fields="1-${depth}"
local depth=$(($(tr "/" "\n" <<<"$charts_dir" | sed '/^\(\.\)*$/d' | wc -l) + 1))
local fields="1-${depth}"

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


package_chart() {
local chart="$1"

Expand Down

0 comments on commit a9fe469

Please sign in to comment.