Skip to content

Commit 5b91899

Browse files
committed
add --gpgSign/-S option
1 parent 1104f09 commit 5b91899

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

lib/promote_release.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ export default class ReleasePromotion extends Session {
1717
this.isLTS = false;
1818
this.ltsCodename = '';
1919
this.date = '';
20+
this.gpgSign = argv?.['gpg-sign']
21+
? (argv['gpg-sign'] === true ? ['-S'] : ['-S', argv['gpg-sign']])
22+
: [];
2023
}
2124

2225
async promote() {
@@ -375,6 +378,7 @@ export default class ReleasePromotion extends Session {
375378
await forceRunAsync('git', ['add', filePath], { ignoreFailure: false });
376379
return forceRunAsync('git', [
377380
'commit',
381+
...this.gpgSign,
378382
'-m',
379383
`Working on ${workingOnVersion}`,
380384
'-m',
@@ -427,6 +431,7 @@ export default class ReleasePromotion extends Session {
427431
await this.tryResetBranch();
428432

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

0 commit comments

Comments
 (0)