diff --git a/.circleci/config.yml b/.circleci/config.yml index d0913051bd1c2..c48fb957930cd 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -187,7 +187,7 @@ jobs: # branch. Once they do, replace with `merge-base HEAD origin/master` command: | git fetch origin master - echo "$(merge-base HEAD origin/master)" + echo "$(git merge-base HEAD origin/master)" cd ./scripts/release && yarn && cd ../../ scripts/release/download-experimental-build.js --commit=6b8d4ca mv ./build2 ./base-build diff --git a/scripts/release/get-build-id-for-commit.js b/scripts/release/get-build-id-for-commit.js index fca6d0280d3a3..15cbe7de52c46 100644 --- a/scripts/release/get-build-id-for-commit.js +++ b/scripts/release/get-build-id-for-commit.js @@ -35,13 +35,15 @@ async function getBuildIdForCommit(sha) { if (status.state === 'failure') { throw new Error(`Build job for commit failed: ${sha}`); } - if (Date.now() < retryLimit) { - await wait(POLLING_INTERVAL); - continue retry; - } - throw new Error('Exceeded retry limit. Build job is still pending.'); } } + if (state === 'pending') { + if (Date.now() < retryLimit) { + await wait(POLLING_INTERVAL); + continue retry; + } + throw new Error('Exceeded retry limit. Build job is still pending.'); + } throw new Error('Could not find build for commit: ' + sha); } }