Skip to content

Commit ec32961

Browse files
committed
feat(system): add gotestchanged
1 parent f6fb3f8 commit ec32961

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

pkgs/bins/bin/gotestchanged

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#!/bin/sh
2+
# go test only the changed packages.
3+
set -e
4+
git status --porcelain |
5+
awk '{print $2}' |
6+
while read -r file; do
7+
echo "./$(dirname "$file")/..."
8+
done |
9+
sort |
10+
uniq |
11+
tr '\n' ' ' |
12+
xargs go test --failfast

0 commit comments

Comments
 (0)