#!/bin/bash # Find changes between the latest commit and main CHANGED_FILES=$(git diff --name-only origin/main..HEAD) # Extract directories under 'services' that were changed CHANGED_DIRS=$(echo "$CHANGED_FILES" | grep '^services/' | cut -d'/' -f2 | sort | uniq) echo $CHANGED_DIRS