2015-02-12 04:26:43 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
2015-03-23 17:55:49 +00:00
|
|
|
# Copyright (c) 2015-present, Facebook, Inc.
|
|
|
|
# All rights reserved.
|
|
|
|
#
|
|
|
|
# This source code is licensed under the BSD-style license found in the
|
|
|
|
# LICENSE file in the root directory of this source tree. An additional grant
|
|
|
|
# of patent rights can be found in the PATENTS file in the same directory.
|
|
|
|
|
2015-02-12 04:26:43 +00:00
|
|
|
set -e
|
|
|
|
|
|
|
|
# Start in website/ even if run from root directory
|
|
|
|
cd "$(dirname "$0")"
|
|
|
|
|
|
|
|
cd ../../react-native-gh-pages
|
|
|
|
git checkout -- .
|
|
|
|
git clean -dfx
|
|
|
|
git fetch
|
|
|
|
git rebase
|
|
|
|
rm -Rf *
|
|
|
|
cd ../react-native/website
|
|
|
|
node server/generate.js
|
|
|
|
cp -R build/react-native/* ../../react-native-gh-pages/
|
|
|
|
rm -Rf build/
|
|
|
|
cd ../../react-native-gh-pages
|
2015-04-03 16:54:30 +00:00
|
|
|
git status
|
|
|
|
if ! git diff-index --quiet HEAD --; then
|
|
|
|
git add -A .
|
|
|
|
git commit -m "update website"
|
|
|
|
git push origin gh-pages
|
|
|
|
fi
|
2015-03-16 03:27:08 +00:00
|
|
|
cd ../react-native/website
|