mirror of
https://github.com/status-im/react-native.git
synced 2025-01-10 01:25:39 +00:00
c43b2da158
In #3421 we created a new folder but it didn't get picked up by the publish script. ``` Untracked files: (use "git add <file>..." to include in what will be committed) js/ ``` The reason is that `git diff-index --quiet HEAD --` returns 0 for untracked files. But, if we add before, it returns 1. It still returns 0 if we add but there's nothing changed
33 lines
793 B
Bash
Executable File
33 lines
793 B
Bash
Executable File
#!/bin/bash
|
|
|
|
# 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.
|
|
|
|
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
|
|
git status
|
|
git add -A .
|
|
if ! git diff-index --quiet HEAD --; then
|
|
git commit -m "update website"
|
|
git push origin gh-pages
|
|
fi
|
|
cd ../react-native/website
|