File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change 8
8
# the merge base by Dangerfile instead. See https://github.com/facebook/react/pull/12606.
9
9
if [ -z " $CI_PULL_REQUEST " ]; then
10
10
curl -o scripts/rollup/results.json http://react.zpao.com/builds/master/latest/results.json
11
+ else
12
+ # If build fails, cause danger to fail/abort too
13
+ rm scripts/rollup/results.json
11
14
fi
12
15
13
16
yarn build --extract-errors
Original file line number Diff line number Diff line change @@ -5,7 +5,9 @@ const filesize = require('filesize');
5
5
const chalk = require ( 'chalk' ) ;
6
6
const join = require ( 'path' ) . join ;
7
7
const fs = require ( 'fs' ) ;
8
- const prevBuildResults = require ( './results.json' ) ;
8
+ const prevBuildResults = fs . existsSync ( __dirname + '/results.json' )
9
+ ? require ( './results.json' )
10
+ : { bundleSizes : [ ] } ;
9
11
10
12
const currentBuildResults = {
11
13
// Mutated inside build.js during a build run.
You can’t perform that action at this time.
0 commit comments