From 0ff15c3f0eb367bc9b8b11a636161960d854f6d9 Mon Sep 17 00:00:00 2001 From: Dan Abramov Date: Mon, 18 Dec 2017 20:06:02 +0000 Subject: [PATCH 1/3] Calculate build sizes relative to merge base --- scripts/circleci/build.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/circleci/build.sh b/scripts/circleci/build.sh index f186f7674f483..116aed39f1416 100755 --- a/scripts/circleci/build.sh +++ b/scripts/circleci/build.sh @@ -5,7 +5,10 @@ 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 +curl -o scripts/rollup/results.json $json_url yarn build --extract-errors # Note: since we run the full build including extracting error codes, From af469c440b8e08fe54377c58517f38f1d516afb7 Mon Sep 17 00:00:00 2001 From: Dan Abramov Date: Mon, 18 Dec 2017 20:27:59 +0000 Subject: [PATCH 2/3] Add an echo to debug --- scripts/circleci/build.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/circleci/build.sh b/scripts/circleci/build.sh index 116aed39f1416..defaa8d1d26b2 100755 --- a/scripts/circleci/build.sh +++ b/scripts/circleci/build.sh @@ -8,6 +8,7 @@ set -e 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 curl -o scripts/rollup/results.json $json_url yarn build --extract-errors From 27836c787e9974f0930cfc12158d8e5cccf672d2 Mon Sep 17 00:00:00 2001 From: Dan Abramov Date: Mon, 18 Dec 2017 21:02:34 +0000 Subject: [PATCH 3/3] =?UTF-8?q?echo=20=C2=A3CIRCLE=5FCOMPARE=5FURL=20to=20?= =?UTF-8?q?see=20what=20it's=20like?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/circleci/build.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/circleci/build.sh b/scripts/circleci/build.sh index defaa8d1d26b2..545a2766699af 100755 --- a/scripts/circleci/build.sh +++ b/scripts/circleci/build.sh @@ -9,6 +9,7 @@ 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