diff --git a/scripts/circleci/build.sh b/scripts/circleci/build.sh index f186f7674f483..545a2766699af 100755 --- a/scripts/circleci/build.sh +++ b/scripts/circleci/build.sh @@ -5,7 +5,12 @@ set -e # Update the local size measurements to the master version # so that the size diff printed at the end of the build is # accurate. -curl -o scripts/rollup/results.json http://react.zpao.com/builds/master/latest/results.json +merge_base_hash=`git merge-base HEAD master` +timestamp=`git log --format='%ct' -1 $merge_base_hash` +json_url=http://react.zpao.com/builds/master/$timestamp-$merge_base_hash/results.json +echo Downloading original build sizes from: $json_url +echo $CIRCLE_COMPARE_URL +curl -o scripts/rollup/results.json $json_url yarn build --extract-errors # Note: since we run the full build including extracting error codes,