Clean shell scripts (#12365)

This commit is contained in:
Léo Andrès
2018-03-21 16:03:09 +00:00
committed by Nathan Hunzaker
parent f9377c1762
commit 3ed6483e14
4 changed files with 10 additions and 10 deletions

View File

@@ -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"

View File

@@ -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?

View File

@@ -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"

View File

@@ -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