File tree Expand file tree Collapse file tree 2 files changed +18
-0
lines changed
Expand file tree Collapse file tree 2 files changed +18
-0
lines changed Original file line number Diff line number Diff line change 1+ # Exclude tests directory from releases/tarballs
2+ tests / export-ignore
Original file line number Diff line number Diff line change @@ -190,6 +190,19 @@ check_license() {
190190 fi
191191}
192192
193+ # Check .gitattributes
194+ check_gitattributes () {
195+ local gitattributes=" .gitattributes"
196+
197+ if [[ -f " $gitattributes " ]]; then
198+ if ! grep -q " tests" " $gitattributes " ; then
199+ actions+=(" $gitattributes should contain 'tests', see upstream file $UPSTREAM /$gitattributes " )
200+ fi
201+ else
202+ actions+=(" $gitattributes is missing, see upstream file $UPSTREAM /$gitattributes " )
203+ fi
204+ }
205+
193206# Main function
194207main () {
195208 if [[ ! -f " install.yaml" ]]; then
@@ -233,6 +246,9 @@ main() {
233246
234247 # Check LICENSE file
235248 check_license
249+
250+ # Check .gitattributes
251+ check_gitattributes
236252
237253 # If any actions are needed, throw an error
238254 if [[ ${# actions[@]} -gt 0 ]]; then
You can’t perform that action at this time.
0 commit comments