ci: update release script to handle new CircleCI configs (#33914)

This commit is contained in:
John Kleinschmidt 2022-04-25 11:14:16 -04:00 committed by GitHub
parent 0a73f60423
commit 6a1748da06
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -110,12 +110,12 @@ async function getCircleCIWorkflowId (pipelineId) {
switch (pipelineInfo.state) {
case 'created': {
const workflows = await circleCIRequest(`${pipelineInfoUrl}/workflow`, 'GET');
// The logic below expects two workflow.items: publish [0] & setup [1]
if (workflows.items.length === 2) {
// The logic below expects three workflow.items: publish, lint, & setup
if (workflows.items.length === 3) {
workflowId = workflows.items.find(item => item.name.includes('publish')).id;
break;
}
console.log('Unxpected number of workflows, response was:', pipelineInfo);
console.log('Unxpected number of workflows, response was:', workflows);
workflowId = -1;
break;
}