From 0dff168820380c2f872e8f700079e853c0773bd3 Mon Sep 17 00:00:00 2001 From: Ben Alpert Date: Fri, 3 Apr 2015 09:54:30 -0700 Subject: [PATCH] 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. --- website/publish.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/website/publish.sh b/website/publish.sh index 29cf8d3f9..dfb10e772 100755 --- a/website/publish.sh +++ b/website/publish.sh @@ -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