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 assigned = {
|
11 | 'gh-email': {
|
12 | describe: 'Your GitHub email',
|
13 | type: 'string'
|
14 | },
|
15 | 'release-gh-token': {
|
16 | describe: 'GitHub token for making releases. This should differ from the gh-token parameter and be local to '
|
17 | + 'this repo.',
|
18 | type: 'string'
|
19 | },
|
20 | 'release-npm-token': {
|
21 | describe: 'NPM token for making releases. This should be unique to this repo.',
|
22 | type: 'string'
|
23 | },
|
24 | 'skip-travis-release': {
|
25 | default: false,
|
26 | describe: 'Skip setting up a Travis release',
|
27 | type: 'boolean'
|
28 | },
|
29 | 'travis-endpoint': {
|
30 | choices: lodash_1.values(TravisEndpoint),
|
31 | default: TravisEndpoint.PRO,
|
32 | describe: 'Travis endpoint to use',
|
33 | type: 'string'
|
34 | },
|
35 | 'travis-token-org': {
|
36 | describe: `Travis token if using the ${TravisEndpoint.ORG} endpoint`,
|
37 | type: 'string'
|
38 | },
|
39 | 'travis-token-pro': {
|
40 | describe: `Travis token if using the ${TravisEndpoint.PRO} endpoint`,
|
41 | type: 'string'
|
42 | }
|
43 | };
|
44 | Object.assign(opts, assigned);
|
45 | return opts;
|
46 | }
|
47 | exports.addTravisRelease = addTravisRelease;
|