1 | "use strict";
|
2 | Object.defineProperty(exports, "__esModule", { value: true });
|
3 | const lodash_1 = require("lodash");
|
4 | var TravisEndpoint;
|
5 | (function (TravisEndpoint) {
|
6 | TravisEndpoint["ORG"] = "org";
|
7 | TravisEndpoint["PRO"] = "pro";
|
8 | })(TravisEndpoint = exports.TravisEndpoint || (exports.TravisEndpoint = {}));
|
9 | function addTravisRelease(opts = {}) {
|
10 | const gpg = ' for the GPG key used for signing release commits.';
|
11 | const assigned = {
|
12 | 'gh-email': {
|
13 | describe: 'Your GitHub email',
|
14 | type: 'string'
|
15 | },
|
16 | 'gpg-key-id': {
|
17 | describe: `Key ID${gpg}`,
|
18 | type: 'string'
|
19 | },
|
20 | 'gpg-key-pwd': {
|
21 | describe: `Password${gpg}`,
|
22 | type: 'string'
|
23 | },
|
24 | 'gpg-privkey': {
|
25 | describe: `Private key contents${gpg}`,
|
26 | type: 'string'
|
27 | },
|
28 | 'gpg-pubkey': {
|
29 | describe: `Public key contents${gpg}`,
|
30 | type: 'string'
|
31 | },
|
32 | 'release-gh-token': {
|
33 | describe: 'GitHub token for making releases. This should differ from the gh-token parameter and be local to '
|
34 | + 'this repo.',
|
35 | type: 'string'
|
36 | },
|
37 | 'release-npm-token': {
|
38 | describe: 'NPM token for making releases. This should be unique to this repo.',
|
39 | type: 'string'
|
40 | },
|
41 | 'skip-travis-release': {
|
42 | default: false,
|
43 | describe: 'Skip setting up a Travis release',
|
44 | type: 'boolean'
|
45 | },
|
46 | 'travis-endpoint': {
|
47 | choices: lodash_1.values(TravisEndpoint),
|
48 | default: TravisEndpoint.PRO,
|
49 | describe: 'Travis endpoint to use',
|
50 | type: 'string'
|
51 | },
|
52 | 'travis-token-org': {
|
53 | describe: `Travis token if using the ${TravisEndpoint.ORG} endpoint`,
|
54 | type: 'string'
|
55 | },
|
56 | 'travis-token-pro': {
|
57 | describe: `Travis token if using the ${TravisEndpoint.PRO} endpoint`,
|
58 | type: 'string'
|
59 | }
|
60 | };
|
61 | Object.assign(opts, assigned);
|
62 | return opts;
|
63 | }
|
64 | exports.addTravisRelease = addTravisRelease;
|