File tree 1 file changed +17
-1
lines changed
1 file changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -28,6 +28,12 @@ function cleanup {
28
28
}
29
29
trap cleanup EXIT
30
30
31
+ function get_interesting_files() {
32
+ local dir=$1
33
+ local files=$( ls ${dir} /sigs.yaml ${dir} /sig-* /README.md ${dir} /wg-* /README.md ${dir} /committee-* /README.md ${dir} /sig-list.md ${dir} /OWNERS_ALIASES)
34
+ echo " $files "
35
+ }
36
+
31
37
git archive --format=tar " $( git write-tree) " | (cd " ${WORKING_DIR} " && tar xf -)
32
38
33
39
cd " ${WORKING_DIR} "
@@ -36,14 +42,24 @@ make 1>/dev/null
36
42
mismatches=0
37
43
break=$( printf " =%.0s" $( seq 1 68) )
38
44
39
- for file in $( ls ${CRT_DIR} /sigs.yaml ${CRT_DIR} /sig-* /README.md ${CRT_DIR} /wg-* /README.md ${CRT_DIR} /committee-* /README.md ${CRT_DIR} /sig-list.md ${CRT_DIR} /OWNERS_ALIASES) ; do
45
+
46
+ real_files=$( get_interesting_files " $CRT_DIR " )
47
+ for file in $real_files ; do
40
48
real=${file# $CRT_DIR / }
41
49
if ! diff -q ${file} ${WORKING_DIR} /${real} & > /dev/null; then
42
50
echo " ${file} does not match ${WORKING_DIR} /${real} " ;
43
51
mismatches=$(( mismatches+ 1 ))
44
52
fi ;
45
53
done
46
54
55
+ real_files_count=$( echo " $real_files " | wc -w)
56
+ working_dir_files_count=$( get_interesting_files " ${WORKING_DIR} " | wc -l)
57
+
58
+ if [[ $real_files_count -ne $working_dir_files_count ]]; then
59
+ echo " Mismatch: Number of generated files in does not match the number of files in the repository."
60
+ mismatches=$(( mismatches+ 1 ))
61
+ fi
62
+
47
63
if [[ ${mismatches} -gt " 0" ]]; then
48
64
echo " "
49
65
echo " ${break} "
You can’t perform that action at this time.
0 commit comments