Skip to content
Prev Previous commit
Next Next commit
fix: run release script asynchronously
  • Loading branch information
codebytere committed May 20, 2020
commit 692c6b725246319733e5433ad044f4fc06862fb8
12 changes: 6 additions & 6 deletions lib/promote_release.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const { promises: fs } = require('fs');
const semver = require('semver');

const { getMergedConfig } = require('./config');
const { runSync } = require('./run');
const { runSync, runAsync } = require('./run');
const auth = require('./auth');
const PRData = require('./pr_data');
const PRChecker = require('./pr_checker');
Expand Down Expand Up @@ -101,7 +101,7 @@ class ReleasePromotion {

// Merge vX.Y.Z-proposal into vX.x.
cli.startSpinner('Merging proposal branch');
await this.mergeProposalBranch();
this.mergeProposalBranch();
cli.stopSpinner('Merged proposal branch');

// Cherry pick release commit to master.
Expand Down Expand Up @@ -151,7 +151,7 @@ class ReleasePromotion {
const keyPath = await cli.prompt(
`Please enter the path to your ssh key (Default ${defaultKeyPath}): `,
{ questionType: 'input', defaultAnswer: defaultKeyPath });
this.promoteAndSignRelease(keyPath);
await this.promoteAndSignRelease(keyPath);

cli.separator();
cli.ok(`Release promotion for ${version} complete.\n`);
Expand Down Expand Up @@ -292,7 +292,7 @@ class ReleasePromotion {
]);
}

async mergeProposalBranch() {
mergeProposalBranch() {
const { stagingBranch, versionComponents, version } = this;

const releaseBranch = `v${versionComponents.major}.x`;
Expand All @@ -313,8 +313,8 @@ class ReleasePromotion {
return runSync('git', ['push', 'upstream', tagVersion]);
}

promoteAndSignRelease(keyPath) {
return runSync('./tools/release.sh', ['-i', keyPath]);
async promoteAndSignRelease(keyPath) {
await runAsync('./tools/release.sh', ['-i', keyPath]);
}

cherryPickToMaster() {
Expand Down