Skip to content

Commit

Permalink
add --gpgSign/-S option
Browse files Browse the repository at this point in the history
  • Loading branch information
aduh95 committed Jul 22, 2024
1 parent 1104f09 commit 5b91899
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/promote_release.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ export default class ReleasePromotion extends Session {
this.isLTS = false;
this.ltsCodename = '';
this.date = '';
this.gpgSign = argv?.['gpg-sign']
? (argv['gpg-sign'] === true ? ['-S'] : ['-S', argv['gpg-sign']])
: [];
}

async promote() {
Expand Down Expand Up @@ -375,6 +378,7 @@ export default class ReleasePromotion extends Session {
await forceRunAsync('git', ['add', filePath], { ignoreFailure: false });
return forceRunAsync('git', [
'commit',
...this.gpgSign,
'-m',
`Working on ${workingOnVersion}`,
'-m',
Expand Down Expand Up @@ -427,6 +431,7 @@ export default class ReleasePromotion extends Session {
await this.tryResetBranch();

// There will be conflicts, we do not want to treat this as a failure.
await forceRunAsync('git', ['cherry-pick', releaseCommitSha], { ignoreFailure: true });
await forceRunAsync('git', ['cherry-pick', ...this.gpgSign, releaseCommitSha],
{ ignoreFailure: true });
}
}

0 comments on commit 5b91899

Please sign in to comment.