Skip to content

Commit

Permalink
Make mergeProposalBranch asynchronous
Browse files Browse the repository at this point in the history
  • Loading branch information
codebytere committed May 4, 2020
1 parent 42a9d9f commit f6eee6a
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 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, runAsync } = require('./run');
const { runSync } = require('./run');
const auth = require('./auth');
const PRData = require('./pr_data');
const PRChecker = require('./pr_checker');
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 });
await this.promoteAndSignRelease(keyPath);
this.promoteAndSignRelease(keyPath);

cli.separator();
cli.ok(`Release promotion for ${version} complete.\n`);
Expand Down Expand Up @@ -298,12 +298,12 @@ class ReleasePromotion {
const releaseBranch = `v${versionComponents.major}.x`;
const proposalBranch = `v${version}-proposal`;

runSync('git', ['checkout', releaseBranch]);
runSync('git', ['merge', '--ff-only', proposalBranch]);
runSync('git', ['push', 'upstream', releaseBranch]);
runSync('git', ['checkout', stagingBranch]);
runSync('git', ['rebase', releaseBranch]);
runSync('git', ['push', 'upstream', stagingBranch]);
await runAsync('git', ['checkout', releaseBranch]);
await runAsync('git', ['merge', '--ff-only', proposalBranch]);
await runAsync('git', ['push', 'upstream', releaseBranch]);
await runAsync('git', ['checkout', stagingBranch]);
await runAsync('git', ['rebase', releaseBranch]);
await runAsync('git', ['push', 'upstream', stagingBranch]);
}

pushReleaseTag() {
Expand All @@ -321,7 +321,7 @@ class ReleasePromotion {
// Since we've committed the Working On commit, the release
// commit will be 1 removed from tip-of-tree (e.g HEAD~1).
const releaseCommitSha = this.getCommitSha(1);
runSync('git', ['checkout', 'master']);
runAsync('git', ['checkout', 'master']);

// Pull master from upstream, in case it's not up-to-date.
runSync('git', ['pull', '--rebase', 'upstream', 'master']);
Expand Down

0 comments on commit f6eee6a

Please sign in to comment.