Skip to content

Commit a43f315

Browse files
author
Edmundo Alvarez
committed
Do not update git when there are no changes
1 parent 8690c86 commit a43f315

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

scripts/build.sh

+9-3
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,15 @@ cd $ORIGINAL_PATH
1919
git checkout gh-pages
2020
rm -r ./*
2121
cp -r $SERVER_PATH/graylog2-web-interface/docs/styleguide/* ./
22-
git add -A
23-
git commit -m "Update website to $SERVER_SHA"
24-
git push origin gh-pages
22+
23+
NUMBER_CHANGES=$(git status -s | wc -l)
24+
if [[ $NUMBER_CHANGES -gt 0 ]]; then
25+
git add -A
26+
git commit -m "Update website to $SERVER_SHA"
27+
git push origin gh-pages
28+
else
29+
echo "No changes made, skipping commit"
30+
fi
2531

2632
exit 0
2733

0 commit comments

Comments
 (0)