Skip to content

Commit 4303e95

Browse files
authored
fix: Exclude tests from release tarball (#90)
1 parent 84adebc commit 4303e95

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

.gitattributes

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Exclude tests directory from releases/tarballs
2+
tests/ export-ignore

.github/scripts/update-checker.sh

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff 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
194207
main() {
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

0 commit comments

Comments
 (0)