Skip to content

Commit

Permalink
fix: run release script asynchronously
Browse files Browse the repository at this point in the history
  • Loading branch information
codebytere committed May 5, 2020
1 parent 8ce4bd6 commit d944859
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions lib/promote_release.js
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

0 comments on commit d944859

Please sign in to comment.