Don't try to commit website on Travis if no changes

This was causing the build to fail if the website hadn't changed,
because `git commit` would exit 1. This matches what we do on React now.
This commit is contained in:
Ben Alpert 2015-04-03 09:54:30 -07:00
parent 2c13456f99
commit 0dff168820
1 changed files with 6 additions and 3 deletions

View File

@ -23,7 +23,10 @@ node server/generate.js
cp -R build/react-native/* ../../react-native-gh-pages/
rm -Rf build/
cd ../../react-native-gh-pages
git add --all
git commit -m "update website"
git push
git status
if ! git diff-index --quiet HEAD --; then
git add -A .
git commit -m "update website"
git push origin gh-pages
fi
cd ../react-native/website