better change detection

This commit is contained in:
Jeff Billimek 2019-08-05 00:52:34 -04:00
parent ee2bcafce3
commit d54e0ae98b

View File

@ -40,7 +40,14 @@ main() {
echo "Identifying changed charts since tag '$latest_tag'..." echo "Identifying changed charts since tag '$latest_tag'..."
local changed_charts=() local changed_charts=()
readarray -t changed_charts <<< "$(find "$(git diff --find-renames --name-only "$latest_tag_rev" -- .)" -type f -iname 'Chart.yaml' | cut -d '/' -f 1 | uniq)" git diff --find-renames --name-only comcast-1.0.5 -- . | cut -d '/' -f 1 | uniq > /tmp/modified_dirs.txt
while read -r dir; do
echo "checking $dir"
if find "$dir" -type f -iname "Chart.yaml" | grep -E -q 'Chart.yaml'; then
changed_charts+=($dir)
fi
done < /tmp/modified_dirs.txt
rm /tmp/modified_dirs.txt
if [[ -n "${changed_charts[*]}" ]]; then if [[ -n "${changed_charts[*]}" ]]; then
for chart in "${changed_charts[@]}"; do for chart in "${changed_charts[@]}"; do