File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -20,13 +20,14 @@ if [[ -z "${DIFF_RANGE}" ]]; then
2020 fi
2121fi
2222
23+ echo " Checking changes in range: ${DIFF_RANGE} " >&2
24+
2325# Folders where changes ALONE should NOT trigger the job
2426ALLOWED_PREFIXES=(
2527 " Azure_Pipelines/"
2628 " docs/"
2729 " Scripts/"
2830 " .github/"
29- " Web/"
3031)
3132
3233# Collect changed files (added/changed/renamed)
@@ -37,6 +38,7 @@ run_job="false"
3738
3839if (( ${# FILES[@]} == 0 )) ; then
3940 # no changes → skip
41+ echo " No changes detected in range ${DIFF_RANGE} ." >&2
4042 echo " run_job=${run_job} "
4143 exit 0
4244fi
@@ -47,14 +49,20 @@ for file in "${FILES[@]}"; do
4749 for prefix in " ${ALLOWED_PREFIXES[@]} " ; do
4850 if [[ " ${file} " == ${prefix} * ]]; then
4951 allowed=" true"
52+ echo " File '${file} ' is in allowed prefix '${prefix} '. It does not trigger the job." >&2
5053 break
5154 fi
5255 done
5356
5457 if [[ " ${allowed} " == " false" ]]; then
58+ echo " File '${file} ' is NOT in any allowed prefix. Job must run." >&2
5559 run_job=" true"
5660 break
5761 fi
5862done
5963
64+ if [[ " ${run_job} " == " false" ]]; then
65+ echo " All changed files are in allowed prefixes. Skipping job." >&2
66+ fi
67+
6068echo " run_job=${run_job} "
You can’t perform that action at this time.
0 commit comments