mirror of
https://github.com/zebrajr/react.git
synced 2026-01-15 12:15:22 +00:00
Clean shell scripts (#12365)
This commit is contained in:
committed by
Nathan Hunzaker
parent
f9377c1762
commit
3ed6483e14
@@ -2,9 +2,9 @@
|
||||
|
||||
set -e
|
||||
|
||||
if [ -n $GITHUB_TOKEN ]; then
|
||||
if [ -n "$GITHUB_TOKEN" ]; then
|
||||
|
||||
GH_PAGES_DIR=`pwd`/../react-gh-pages
|
||||
GH_PAGES_DIR=$(pwd)/../react-gh-pages
|
||||
echo "machine github.com login reactjs-bot password $GITHUB_TOKEN" >~/.netrc
|
||||
git config --global user.name "Circle CI"
|
||||
git config --global user.email "circle@reactjs.org"
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
set -e
|
||||
|
||||
yarn test --coverage --maxWorkers=2
|
||||
if [ -z $CI_PULL_REQUEST ]; then
|
||||
cat ./coverage/lcov.info | ./node_modules/.bin/coveralls
|
||||
if [ -z "$CI_PULL_REQUEST" ]; then
|
||||
./node_modules/.bin/coveralls < ./coverage/lcov.info
|
||||
fi
|
||||
|
||||
# TODO: should we also track prod code coverage somehow?
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
set -e
|
||||
|
||||
ALL_FILES=`find packages -name '*.js' | grep -v umd/ | grep -v __tests__ | grep -v __mocks__`
|
||||
COUNT_ALL_FILES=`echo "$ALL_FILES" | wc -l`
|
||||
COUNT_WITH_FLOW=`grep '@flow' $ALL_FILES | perl -pe 's/:.+//' | wc -l`
|
||||
ALL_FILES=$(find packages -name '*.js' | grep -v umd/ | grep -v __tests__ | grep -v __mocks__)
|
||||
COUNT_ALL_FILES=$(echo "$ALL_FILES" | wc -l)
|
||||
COUNT_WITH_FLOW=$(grep '@flow' $ALL_FILES | perl -pe 's/:.+//' | wc -l)
|
||||
node scripts/facts-tracker/index.js "flow-files" "$COUNT_WITH_FLOW/$COUNT_ALL_FILES"
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
set -e
|
||||
|
||||
if [ -z $CI_PULL_REQUEST ] && [ -n "$BUILD_SERVER_ENDPOINT" ]; then
|
||||
if [ -z "$CI_PULL_REQUEST" ] && [ -n "$BUILD_SERVER_ENDPOINT" ]; then
|
||||
curl \
|
||||
-F "react.development=@build/dist/react.development.js" \
|
||||
-F "react.production.min=@build/dist/react.production.min.js" \
|
||||
@@ -12,9 +12,9 @@ if [ -z $CI_PULL_REQUEST ] && [ -n "$BUILD_SERVER_ENDPOINT" ]; then
|
||||
-F "react-dom-server.browser.production.min=@build/dist/react-dom-server.browser.production.min.js" \
|
||||
-F "results.json=@build/../scripts/rollup/results.json" \
|
||||
-F "commit=$CIRCLE_SHA1" \
|
||||
-F "date=`git log --format='%ct' -1`" \
|
||||
-F "date=$(git log --format='%ct' -1)" \
|
||||
-F "pull_request=false" \
|
||||
-F "token=$BUILD_SERVER_TOKEN" \
|
||||
-F "branch=$CIRCLE_BRANCH" \
|
||||
$BUILD_SERVER_ENDPOINT
|
||||
"$BUILD_SERVER_ENDPOINT"
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user