Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion scripts/deployment/check-base-image-changes.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,21 @@ else

# Remove spaces
base_path="$(printf '%s' "$base_path" | xargs)"
base_path="${base_path#./}"


for changed_path in "${source_changes[@]}"; do
if [[ "${changed_path}" == "${base_path}" ]]; then
changed_path="${changed_path#./}"

if [[ "${base_path}" == */ ]]; then
matches=false
[[ "${changed_path}" == "${base_path}"* ]] && matches=true
else
matches=false
[[ "${changed_path}" == "${base_path}" || "${changed_path}" == "${base_path}/"* ]] && matches=true
fi

if [[ "${matches}" == true ]]; then
echo "Base image change detected in: ${changed_path}"
build_base_image=true
break 2
Expand Down
Loading