Skip to content

Commit 77158b0

Browse files
committed
Properly abort on no changes
1 parent 698b4e1 commit 77158b0

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

test_changes.sh

+7-2
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,19 @@
22

33
set -euxo pipefail
44

5-
65
CHANGED_SCRAPERS=$(git whatchanged --name-only --pretty="" origin/master..HEAD |
76
grep spiders |
87
grep -v helper |
98
sed 's/jedeschule\/spiders\///' |
109
sed 's/\.py//' |
1110
sed 's/_/\-/' |
12-
uniq)
11+
uniq || echo "")
12+
13+
if [ -z "$CHANGED_SCRAPERS" ]
14+
then
15+
echo "No scrapers changed. Exiting"
16+
exit 0
17+
fi
1318

1419
for SPIDER in $CHANGED_SCRAPERS
1520
do

0 commit comments

Comments
 (0)