release-please 12.5.0 → 13.0.0-candidate.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -0
- package/README.md +4 -0
- package/build/src/bin/release-please.d.ts +55 -11
- package/build/src/bin/release-please.js +419 -152
- package/build/src/bootstrapper.d.ts +12 -0
- package/build/src/bootstrapper.js +60 -0
- package/build/src/changelog-notes/default.d.ts +17 -0
- package/build/src/changelog-notes/default.js +72 -0
- package/build/src/changelog-notes.d.ts +17 -0
- package/build/src/{updaters/java/readme.js → changelog-notes.js} +2 -7
- package/build/src/commit.d.ts +26 -0
- package/build/src/{util/to-conventional-changelog-format.js → commit.js} +97 -2
- package/build/src/errors/index.d.ts +0 -5
- package/build/src/errors/index.js +1 -10
- package/build/src/factory.d.ts +25 -37
- package/build/src/factory.js +160 -150
- package/build/src/github.d.ts +154 -884
- package/build/src/github.js +608 -1036
- package/build/src/manifest.d.ts +191 -47
- package/build/src/manifest.js +599 -487
- package/build/src/plugin.d.ts +20 -0
- package/build/src/{plugins/plugin.js → plugin.js} +10 -9
- package/build/src/plugins/cargo-workspace.d.ts +48 -18
- package/build/src/plugins/cargo-workspace.js +247 -328
- package/build/src/plugins/merge.d.ts +11 -0
- package/build/src/plugins/merge.js +83 -0
- package/build/src/plugins/node-workspace.d.ts +35 -17
- package/build/src/plugins/node-workspace.js +234 -271
- package/build/src/plugins/workspace.d.ts +102 -0
- package/build/src/plugins/workspace.js +170 -0
- package/build/src/pull-request.d.ts +10 -0
- package/build/src/{updaters/java/pom-xml.js → pull-request.js} +2 -7
- package/build/src/release-notes.d.ts +29 -0
- package/build/src/release-notes.js +71 -0
- package/build/src/release-pull-request.d.ts +13 -0
- package/build/src/release-pull-request.js +16 -0
- package/build/src/release.d.ts +6 -0
- package/build/src/release.js +16 -0
- package/build/src/repository.d.ts +5 -0
- package/build/src/repository.js +16 -0
- package/build/src/strategies/dart.d.ts +8 -0
- package/build/src/strategies/dart.js +63 -0
- package/build/src/strategies/elixir.d.ts +5 -0
- package/build/src/{releasers → strategies}/elixir.js +18 -14
- package/build/src/strategies/go-yoshi.d.ts +13 -0
- package/build/src/strategies/go-yoshi.js +106 -0
- package/build/src/strategies/go.d.ts +5 -0
- package/build/src/{releasers → strategies}/go.js +11 -12
- package/build/src/strategies/helm.d.ts +8 -0
- package/build/src/strategies/helm.js +63 -0
- package/build/src/strategies/java-yoshi.d.ts +24 -0
- package/build/src/strategies/java-yoshi.js +203 -0
- package/build/src/strategies/krm-blueprint.d.ts +7 -0
- package/build/src/{releasers → strategies}/krm-blueprint.js +26 -22
- package/build/src/strategies/node.d.ts +9 -0
- package/build/src/strategies/node.js +82 -0
- package/build/src/strategies/ocaml.d.ts +5 -0
- package/build/src/{releasers → strategies}/ocaml.js +34 -28
- package/build/src/strategies/php-yoshi.d.ts +10 -0
- package/build/src/strategies/php-yoshi.js +213 -0
- package/build/src/strategies/php.d.ts +6 -0
- package/build/src/{releasers → strategies}/php.js +24 -23
- package/build/src/strategies/python.d.ts +8 -0
- package/build/src/strategies/python.js +117 -0
- package/build/src/strategies/ruby-yoshi.d.ts +17 -0
- package/build/src/strategies/ruby-yoshi.js +116 -0
- package/build/src/strategies/ruby.d.ts +13 -0
- package/build/src/{releasers → strategies}/ruby.js +26 -27
- package/build/src/strategies/rust.d.ts +20 -0
- package/build/src/strategies/rust.js +120 -0
- package/build/src/strategies/simple.d.ts +5 -0
- package/build/src/{releasers → strategies}/simple.js +18 -14
- package/build/src/strategies/terraform-module.d.ts +7 -0
- package/build/src/{releasers → strategies}/terraform-module.js +29 -23
- package/build/src/strategy.d.ts +100 -0
- package/build/src/strategy.js +233 -0
- package/build/src/update.d.ts +23 -0
- package/build/src/{updaters/update.js → update.js} +1 -1
- package/build/src/updaters/changelog.d.ts +7 -10
- package/build/src/updaters/changelog.js +3 -9
- package/build/src/updaters/changelog.js.map +1 -1
- package/build/src/updaters/composite.d.ts +19 -0
- package/build/src/updaters/composite.js +42 -0
- package/build/src/updaters/dart/pubspec-yaml.d.ts +12 -0
- package/build/src/updaters/{pubspec-yaml.js → dart/pubspec-yaml.js} +13 -12
- package/build/src/updaters/default.d.ts +21 -0
- package/build/src/updaters/{version-txt.js → default.js} +16 -10
- package/build/src/updaters/dotnet/csproj.d.ts +12 -0
- package/build/src/updaters/{java/google-utils.js → dotnet/csproj.js} +16 -13
- package/build/src/updaters/elixir/elixir-mix-exs.d.ts +12 -0
- package/build/src/updaters/{elixir-mix-exs.js → elixir/elixir-mix-exs.js} +12 -10
- package/build/src/updaters/helm/chart-yaml.d.ts +10 -11
- package/build/src/updaters/helm/chart-yaml.js +12 -10
- package/build/src/updaters/java/java-update.d.ts +14 -0
- package/build/src/updaters/java/{java_update.js → java-update.js} +22 -22
- package/build/src/updaters/java/versions-manifest.d.ts +12 -2
- package/build/src/updaters/java/versions-manifest.js +20 -4
- package/build/src/updaters/krm/krm-blueprint-version.d.ts +10 -11
- package/build/src/updaters/krm/krm-blueprint-version.js +13 -12
- package/build/src/updaters/node/package-json.d.ts +12 -0
- package/build/src/updaters/{package-json.js → node/package-json.js} +14 -16
- package/build/src/updaters/node/package-lock-json.d.ts +8 -0
- package/build/src/updaters/node/package-lock-json.js +36 -0
- package/build/src/updaters/node/samples-package-json.d.ts +23 -0
- package/build/src/updaters/{samples-package-json.js → node/samples-package-json.js} +19 -8
- package/build/src/updaters/ocaml/dune-project.d.ts +10 -11
- package/build/src/updaters/ocaml/dune-project.js +11 -9
- package/build/src/updaters/ocaml/esy-json.d.ts +10 -11
- package/build/src/updaters/ocaml/esy-json.js +12 -10
- package/build/src/updaters/ocaml/opam.d.ts +10 -11
- package/build/src/updaters/ocaml/opam.js +11 -9
- package/build/src/updaters/php/php-client-version.d.ts +12 -0
- package/build/src/updaters/{php-client-version.js → php/php-client-version.js} +10 -9
- package/build/src/updaters/php/php-manifest.d.ts +13 -0
- package/build/src/updaters/{php-manifest.js → php/php-manifest.js} +17 -15
- package/build/src/updaters/php/root-composer-update-packages.d.ts +12 -0
- package/build/src/updaters/{root-composer-update-packages.js → php/root-composer-update-packages.js} +17 -16
- package/build/src/updaters/python/pyproject-toml.d.ts +10 -11
- package/build/src/updaters/python/pyproject-toml.js +13 -11
- package/build/src/updaters/python/python-file-with-version.d.ts +7 -11
- package/build/src/updaters/python/python-file-with-version.js +7 -8
- package/build/src/updaters/python/setup-cfg.d.ts +10 -11
- package/build/src/updaters/python/setup-cfg.js +10 -8
- package/build/src/updaters/python/setup-py.d.ts +10 -11
- package/build/src/updaters/python/setup-py.js +10 -8
- package/build/src/updaters/raw-content.d.ts +19 -0
- package/build/src/{plugins/index.js → updaters/raw-content.js} +23 -12
- package/build/src/updaters/release-please-config.d.ts +8 -0
- package/build/src/updaters/release-please-config.js +41 -0
- package/build/src/updaters/release-please-manifest.d.ts +2 -11
- package/build/src/updaters/release-please-manifest.js +11 -14
- package/build/src/updaters/ruby/version-rb.d.ts +12 -0
- package/build/src/updaters/{version-rb.js → ruby/version-rb.js} +10 -8
- package/build/src/updaters/rust/cargo-lock.d.ts +7 -11
- package/build/src/updaters/rust/cargo-lock.js +14 -16
- package/build/src/updaters/rust/cargo-toml.d.ts +7 -11
- package/build/src/updaters/rust/cargo-toml.js +19 -21
- package/build/src/updaters/terraform/module-version.d.ts +10 -11
- package/build/src/updaters/terraform/module-version.js +11 -9
- package/build/src/updaters/terraform/readme.d.ts +10 -11
- package/build/src/updaters/terraform/readme.js +11 -10
- package/build/src/updaters/terraform/readme.js.map +1 -1
- package/build/src/util/branch-name.d.ts +5 -4
- package/build/src/util/branch-name.js +13 -10
- package/build/src/{commit-split.d.ts → util/commit-split.d.ts} +2 -4
- package/build/src/{commit-split.js → util/commit-split.js} +4 -2
- package/build/src/util/indent-commit.d.ts +1 -1
- package/build/src/util/logger.d.ts +5 -2
- package/build/src/util/logger.js +9 -4
- package/build/src/util/pull-request-body.d.ts +20 -0
- package/build/src/util/pull-request-body.js +129 -0
- package/build/src/util/pull-request-title.d.ts +8 -6
- package/build/src/util/pull-request-title.js +20 -6
- package/build/src/util/tag-name.d.ts +9 -0
- package/build/src/util/tag-name.js +41 -0
- package/build/src/{updaters → util}/toml-edit.d.ts +0 -0
- package/build/src/{updaters → util}/toml-edit.js +0 -0
- package/build/src/version.d.ts +11 -0
- package/build/src/version.js +45 -0
- package/build/src/versioning-strategies/always-bump-patch.d.ts +7 -0
- package/build/src/{updaters/package-lock-json.js → versioning-strategies/always-bump-patch.js} +8 -11
- package/build/src/versioning-strategies/default.d.ts +15 -0
- package/build/src/versioning-strategies/default.js +67 -0
- package/build/src/versioning-strategies/dependency-manifest.d.ts +7 -0
- package/build/src/versioning-strategies/dependency-manifest.js +90 -0
- package/build/src/versioning-strategies/java-add-snapshot.d.ts +9 -0
- package/build/src/versioning-strategies/java-add-snapshot.js +53 -0
- package/build/src/versioning-strategies/java-snapshot.d.ts +9 -0
- package/build/src/versioning-strategies/java-snapshot.js +67 -0
- package/build/src/versioning-strategies/service-pack.d.ts +7 -0
- package/build/src/versioning-strategies/service-pack.js +40 -0
- package/build/src/versioning-strategy.d.ts +28 -0
- package/build/src/versioning-strategy.js +55 -0
- package/package.json +9 -8
- package/build/src/constants.d.ts +0 -6
- package/build/src/constants.js +0 -23
- package/build/src/conventional-commits.d.ts +0 -53
- package/build/src/conventional-commits.js +0 -167
- package/build/src/github-release.d.ts +0 -34
- package/build/src/github-release.js +0 -92
- package/build/src/graphql-to-commits.d.ts +0 -60
- package/build/src/graphql-to-commits.js +0 -112
- package/build/src/index.d.ts +0 -94
- package/build/src/index.js +0 -32
- package/build/src/plugins/index.d.ts +0 -5
- package/build/src/plugins/plugin.d.ts +0 -21
- package/build/src/release-pr.d.ts +0 -101
- package/build/src/release-pr.js +0 -461
- package/build/src/releasers/dart.d.ts +0 -9
- package/build/src/releasers/dart.js +0 -65
- package/build/src/releasers/elixir.d.ts +0 -5
- package/build/src/releasers/go-yoshi.d.ts +0 -10
- package/build/src/releasers/go-yoshi.js +0 -162
- package/build/src/releasers/go.d.ts +0 -6
- package/build/src/releasers/helm.d.ts +0 -9
- package/build/src/releasers/helm.js +0 -66
- package/build/src/releasers/index.d.ts +0 -7
- package/build/src/releasers/index.js +0 -76
- package/build/src/releasers/java/bump_type.d.ts +0 -4
- package/build/src/releasers/java/bump_type.js +0 -38
- package/build/src/releasers/java/stability.d.ts +0 -5
- package/build/src/releasers/java/stability.js +0 -37
- package/build/src/releasers/java/version.d.ts +0 -13
- package/build/src/releasers/java/version.js +0 -112
- package/build/src/releasers/java-backport.d.ts +0 -9
- package/build/src/releasers/java-backport.js +0 -43
- package/build/src/releasers/java-bom.d.ts +0 -16
- package/build/src/releasers/java-bom.js +0 -83
- package/build/src/releasers/java-lts.d.ts +0 -9
- package/build/src/releasers/java-lts.js +0 -47
- package/build/src/releasers/java-yoshi.d.ts +0 -28
- package/build/src/releasers/java-yoshi.js +0 -304
- package/build/src/releasers/krm-blueprint.d.ts +0 -6
- package/build/src/releasers/node.d.ts +0 -10
- package/build/src/releasers/node.js +0 -84
- package/build/src/releasers/ocaml.d.ts +0 -5
- package/build/src/releasers/php-yoshi.d.ts +0 -5
- package/build/src/releasers/php-yoshi.js +0 -191
- package/build/src/releasers/php.d.ts +0 -7
- package/build/src/releasers/python.d.ts +0 -11
- package/build/src/releasers/python.js +0 -127
- package/build/src/releasers/ruby-yoshi.d.ts +0 -5
- package/build/src/releasers/ruby-yoshi.js +0 -142
- package/build/src/releasers/ruby.d.ts +0 -11
- package/build/src/releasers/rust.d.ts +0 -30
- package/build/src/releasers/rust.js +0 -163
- package/build/src/releasers/simple.d.ts +0 -5
- package/build/src/releasers/terraform-module.d.ts +0 -6
- package/build/src/updaters/elixir-mix-exs.d.ts +0 -13
- package/build/src/updaters/java/google-utils.d.ts +0 -13
- package/build/src/updaters/java/java_update.d.ts +0 -13
- package/build/src/updaters/java/pom-xml.d.ts +0 -3
- package/build/src/updaters/java/readme.d.ts +0 -3
- package/build/src/updaters/java/readme.js.map +0 -1
- package/build/src/updaters/package-json.d.ts +0 -16
- package/build/src/updaters/package-lock-json.d.ts +0 -7
- package/build/src/updaters/php-client-version.d.ts +0 -13
- package/build/src/updaters/php-manifest.d.ts +0 -13
- package/build/src/updaters/pubspec-yaml.d.ts +0 -13
- package/build/src/updaters/root-composer-update-package.d.ts +0 -13
- package/build/src/updaters/root-composer-update-package.js +0 -45
- package/build/src/updaters/root-composer-update-packages.d.ts +0 -13
- package/build/src/updaters/samples-package-json.d.ts +0 -13
- package/build/src/updaters/update.d.ts +0 -20
- package/build/src/updaters/version-rb.d.ts +0 -13
- package/build/src/updaters/version-txt.d.ts +0 -12
- package/build/src/updaters/version.d.ts +0 -13
- package/build/src/updaters/version.js +0 -31
- package/build/src/util/checkpoint.d.ts +0 -6
- package/build/src/util/checkpoint.js +0 -33
- package/build/src/util/release-notes.d.ts +0 -7
- package/build/src/util/release-notes.js +0 -34
- package/build/src/util/to-conventional-changelog-format.d.ts +0 -2
|
@@ -15,219 +15,484 @@
|
|
|
15
15
|
// limitations under the License.
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
exports.handleError = exports.parser = void 0;
|
|
18
|
-
const chalk = require("chalk");
|
|
19
18
|
const coerce_option_1 = require("../util/coerce-option");
|
|
20
|
-
const factory_1 = require("../factory");
|
|
21
|
-
const releasers_1 = require("../releasers");
|
|
22
19
|
const yargs = require("yargs");
|
|
23
|
-
const
|
|
24
|
-
|
|
20
|
+
const github_1 = require("../github");
|
|
21
|
+
const manifest_1 = require("../manifest");
|
|
22
|
+
const logger_1 = require("../util/logger");
|
|
23
|
+
const factory_1 = require("../factory");
|
|
24
|
+
const bootstrapper_1 = require("../bootstrapper");
|
|
25
|
+
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
|
26
|
+
const parseGithubRepoUrl = require('parse-github-repo-url');
|
|
27
|
+
function gitHubOptions(yargs) {
|
|
28
|
+
return yargs
|
|
29
|
+
.option('token', { describe: 'GitHub token with repo write permissions' })
|
|
30
|
+
.option('api-url', {
|
|
31
|
+
describe: 'URL to use when making API requests',
|
|
32
|
+
default: github_1.GH_API_URL,
|
|
33
|
+
type: 'string',
|
|
34
|
+
})
|
|
35
|
+
.option('graphql-url', {
|
|
36
|
+
describe: 'URL to use when making GraphQL requests',
|
|
37
|
+
default: github_1.GH_GRAPHQL_URL,
|
|
38
|
+
type: 'string',
|
|
39
|
+
})
|
|
40
|
+
.option('default-branch', {
|
|
41
|
+
describe: 'The branch to open release PRs against and tag releases on',
|
|
42
|
+
type: 'string',
|
|
43
|
+
deprecated: 'use --target-branch instead',
|
|
44
|
+
})
|
|
45
|
+
.option('target-branch', {
|
|
46
|
+
describe: 'The branch to open release PRs against and tag releases on',
|
|
47
|
+
type: 'string',
|
|
48
|
+
})
|
|
49
|
+
.option('repo-url', {
|
|
50
|
+
describe: 'GitHub URL to generate release for',
|
|
51
|
+
demand: true,
|
|
52
|
+
})
|
|
53
|
+
.option('dry-run', {
|
|
54
|
+
describe: 'Prepare but do not take action',
|
|
55
|
+
type: 'boolean',
|
|
56
|
+
default: false,
|
|
57
|
+
})
|
|
58
|
+
.middleware(_argv => {
|
|
59
|
+
const argv = _argv;
|
|
60
|
+
// allow secrets to be loaded from file path
|
|
61
|
+
// rather than being passed directly to the bin.
|
|
62
|
+
if (argv.token)
|
|
63
|
+
argv.token = coerce_option_1.coerceOption(argv.token);
|
|
64
|
+
if (argv.apiUrl)
|
|
65
|
+
argv.apiUrl = coerce_option_1.coerceOption(argv.apiUrl);
|
|
66
|
+
if (argv.graphqlUrl)
|
|
67
|
+
argv.graphqlUrl = coerce_option_1.coerceOption(argv.graphqlUrl);
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
function releaseOptions(yargs) {
|
|
71
|
+
return yargs
|
|
72
|
+
.option('draft', {
|
|
73
|
+
describe: 'mark release as a draft. no tag is created but tag_name and ' +
|
|
74
|
+
'target_commitish are associated with the release for future ' +
|
|
75
|
+
'tag creation upon "un-drafting" the release.',
|
|
76
|
+
type: 'boolean',
|
|
77
|
+
default: false,
|
|
78
|
+
})
|
|
79
|
+
.option('label', {
|
|
80
|
+
default: 'autorelease: pending',
|
|
81
|
+
describe: 'comma-separated list of labels to remove to from release PR',
|
|
82
|
+
})
|
|
83
|
+
.option('release-label', {
|
|
84
|
+
describe: 'set a pull request label other than "autorelease: tagged"',
|
|
85
|
+
default: 'autorelease: tagged',
|
|
86
|
+
type: 'string',
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
function pullRequestOptions(yargs) {
|
|
25
90
|
// common to ReleasePR and GitHubRelease
|
|
26
|
-
|
|
91
|
+
return yargs
|
|
92
|
+
.option('label', {
|
|
27
93
|
default: 'autorelease: pending',
|
|
28
|
-
describe: '
|
|
94
|
+
describe: 'comma-separated list of labels to add to from release PR',
|
|
95
|
+
})
|
|
96
|
+
.option('fork', {
|
|
97
|
+
describe: 'should the PR be created from a fork',
|
|
98
|
+
type: 'boolean',
|
|
99
|
+
default: false,
|
|
100
|
+
})
|
|
101
|
+
.option('draft-pull-request', {
|
|
102
|
+
describe: 'mark pull request as a draft',
|
|
103
|
+
type: 'boolean',
|
|
104
|
+
default: false,
|
|
105
|
+
})
|
|
106
|
+
.option('signoff', {
|
|
107
|
+
describe: 'Add Signed-off-by line at the end of the commit log message using the user and email provided. (format "Name <email@example.com>").',
|
|
108
|
+
type: 'string',
|
|
29
109
|
});
|
|
30
|
-
|
|
110
|
+
}
|
|
111
|
+
function pullRequestStrategyOptions(yargs) {
|
|
112
|
+
return yargs
|
|
113
|
+
.option('release-as', {
|
|
31
114
|
describe: 'override the semantically determined release version',
|
|
32
115
|
type: 'string',
|
|
33
|
-
})
|
|
34
|
-
|
|
116
|
+
})
|
|
117
|
+
.option('bump-minor-pre-major', {
|
|
35
118
|
describe: 'should we bump the semver minor prior to the first major release',
|
|
36
119
|
default: false,
|
|
37
120
|
type: 'boolean',
|
|
38
|
-
})
|
|
39
|
-
|
|
121
|
+
})
|
|
122
|
+
.option('bump-patch-for-minor-pre-major', {
|
|
40
123
|
describe: 'should we bump the semver patch instead of the minor for non-breaking' +
|
|
41
124
|
' changes prior to the first major release',
|
|
42
125
|
default: false,
|
|
43
126
|
type: 'boolean',
|
|
44
|
-
})
|
|
45
|
-
|
|
46
|
-
describe: '
|
|
127
|
+
})
|
|
128
|
+
.option('extra-files', {
|
|
129
|
+
describe: 'extra files for the strategy to consider',
|
|
47
130
|
type: 'string',
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
});
|
|
57
|
-
ya.option('version-file', {
|
|
131
|
+
coerce(arg) {
|
|
132
|
+
if (arg) {
|
|
133
|
+
return arg.split(',');
|
|
134
|
+
}
|
|
135
|
+
return arg;
|
|
136
|
+
},
|
|
137
|
+
})
|
|
138
|
+
.option('version-file', {
|
|
58
139
|
describe: 'path to version file to update, e.g., version.rb',
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
});
|
|
63
|
-
ya.option('snapshot', {
|
|
140
|
+
type: 'string',
|
|
141
|
+
})
|
|
142
|
+
.option('snapshot', {
|
|
64
143
|
describe: 'is it a snapshot (or pre-release) being generated?',
|
|
65
144
|
type: 'boolean',
|
|
66
145
|
default: false,
|
|
67
|
-
})
|
|
68
|
-
|
|
146
|
+
})
|
|
147
|
+
.option('versioning-strategy', {
|
|
148
|
+
describe: 'strategy used for bumping versions',
|
|
149
|
+
choices: factory_1.getVersioningStrategyTypes(),
|
|
150
|
+
default: 'default',
|
|
151
|
+
})
|
|
152
|
+
.option('pull-request-title-pattern', {
|
|
69
153
|
describe: 'Title pattern to make release PR',
|
|
70
154
|
type: 'string',
|
|
71
|
-
})
|
|
72
|
-
|
|
73
|
-
describe: 'Add Signed-off-by line at the end of the commit log message using the user and email provided. (format "Name <email@example.com>").',
|
|
74
|
-
type: 'string',
|
|
75
|
-
});
|
|
76
|
-
ya.option('changelog-path', {
|
|
155
|
+
})
|
|
156
|
+
.option('changelog-path', {
|
|
77
157
|
default: 'CHANGELOG.md',
|
|
78
158
|
describe: 'where can the CHANGELOG be found in the project?',
|
|
79
|
-
|
|
80
|
-
|
|
159
|
+
type: 'string',
|
|
160
|
+
})
|
|
161
|
+
.option('last-package-version', {
|
|
162
|
+
describe: 'last version # that package was released as',
|
|
163
|
+
type: 'string',
|
|
164
|
+
deprecated: 'use --latest-tag-version instead',
|
|
165
|
+
})
|
|
166
|
+
.option('latest-tag-version', {
|
|
81
167
|
describe: 'Override the detected latest tag version',
|
|
82
168
|
type: 'string',
|
|
83
|
-
})
|
|
84
|
-
|
|
169
|
+
})
|
|
170
|
+
.option('latest-tag-sha', {
|
|
85
171
|
describe: 'Override the detected latest tag SHA',
|
|
86
172
|
type: 'string',
|
|
87
|
-
})
|
|
88
|
-
|
|
173
|
+
})
|
|
174
|
+
.option('latest-tag-name', {
|
|
89
175
|
describe: 'Override the detected latest tag name',
|
|
90
176
|
type: 'string',
|
|
177
|
+
})
|
|
178
|
+
.middleware(_argv => {
|
|
179
|
+
const argv = _argv;
|
|
180
|
+
if (argv.defaultBranch) {
|
|
181
|
+
logger_1.logger.warn('--default-branch is deprecated. Please use --target-branch instead.');
|
|
182
|
+
argv.targetBranch = argv.targetBranch || argv.defaultBranch;
|
|
183
|
+
}
|
|
184
|
+
if (argv.lastPackageVersion) {
|
|
185
|
+
logger_1.logger.warn('--latest-package-version is deprecated. Please use --latest-tag-version instead.');
|
|
186
|
+
argv.latestTagVersion =
|
|
187
|
+
argv.latestTagVersion || argv.lastPackageVersion;
|
|
188
|
+
}
|
|
91
189
|
});
|
|
92
190
|
}
|
|
93
|
-
function
|
|
94
|
-
|
|
191
|
+
function manifestConfigOptions(yargs, defaultType) {
|
|
192
|
+
return yargs
|
|
193
|
+
.option('path', {
|
|
194
|
+
describe: 'release from path other than root directory',
|
|
195
|
+
type: 'string',
|
|
196
|
+
})
|
|
197
|
+
.option('component', {
|
|
198
|
+
describe: 'name of component release is being minted for',
|
|
199
|
+
type: 'string',
|
|
200
|
+
})
|
|
201
|
+
.option('package-name', {
|
|
202
|
+
describe: 'name of package release is being minted for',
|
|
203
|
+
type: 'string',
|
|
204
|
+
})
|
|
205
|
+
.option('release-type', {
|
|
95
206
|
describe: 'what type of repo is a release being created for?',
|
|
96
|
-
choices:
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
relTypeOptions.default = defaultType;
|
|
100
|
-
}
|
|
101
|
-
ya.option('release-type', relTypeOptions);
|
|
207
|
+
choices: factory_1.getReleaserTypes(),
|
|
208
|
+
default: defaultType,
|
|
209
|
+
});
|
|
102
210
|
}
|
|
103
|
-
function manifestOptions(
|
|
104
|
-
|
|
211
|
+
function manifestOptions(yargs) {
|
|
212
|
+
return yargs
|
|
213
|
+
.option('config-file', {
|
|
105
214
|
default: 'release-please-config.json',
|
|
106
215
|
describe: 'where can the config file be found in the project?',
|
|
107
|
-
})
|
|
108
|
-
|
|
216
|
+
})
|
|
217
|
+
.option('manifest-file', {
|
|
109
218
|
default: '.release-please-manifest.json',
|
|
110
219
|
describe: 'where can the manifest file be found in the project?',
|
|
111
220
|
});
|
|
112
221
|
}
|
|
113
|
-
|
|
114
|
-
.
|
|
115
|
-
|
|
116
|
-
}, (argv) => {
|
|
117
|
-
factory_1.factory.runCommand('manifest-pr', argv).catch(exports.handleError);
|
|
118
|
-
})
|
|
119
|
-
.command('manifest-release', 'create releases/tags from last release-PR using a manifest file', (yargs) => {
|
|
120
|
-
manifestOptions(yargs);
|
|
121
|
-
}, (argv) => {
|
|
122
|
-
factory_1.factory.runCommand('manifest-release', argv).catch(exports.handleError);
|
|
123
|
-
})
|
|
124
|
-
.command('release-pr', 'create or update a PR representing the next release',
|
|
125
|
-
// options unique to ReleasePR
|
|
126
|
-
(yargs) => {
|
|
127
|
-
releaseType(yargs, 'node');
|
|
128
|
-
releaserCommon(yargs);
|
|
129
|
-
}, (argv) => {
|
|
130
|
-
factory_1.factory.runCommand('release-pr', argv).catch(exports.handleError);
|
|
131
|
-
})
|
|
132
|
-
.command('latest-tag', 'find the sha of the latest release',
|
|
133
|
-
// options unique to ReleasePR
|
|
134
|
-
(yargs) => {
|
|
135
|
-
releaseType(yargs, 'node');
|
|
136
|
-
releaserCommon(yargs);
|
|
137
|
-
}, (argv) => {
|
|
138
|
-
factory_1.factory
|
|
139
|
-
.runCommand('latest-tag', argv)
|
|
140
|
-
.catch(exports.handleError)
|
|
141
|
-
.then(latestTag => {
|
|
142
|
-
if (latestTag) {
|
|
143
|
-
console.log(latestTag);
|
|
144
|
-
}
|
|
145
|
-
else {
|
|
146
|
-
console.log('No latest tag found.');
|
|
147
|
-
process.exitCode = 1;
|
|
148
|
-
}
|
|
149
|
-
});
|
|
150
|
-
})
|
|
151
|
-
.command('github-release', 'create a GitHub release from a release PR',
|
|
152
|
-
// options unique to GitHubRelease
|
|
153
|
-
(yargs) => {
|
|
154
|
-
releaseType(yargs);
|
|
155
|
-
releaserCommon(yargs);
|
|
156
|
-
yargs.option('draft', {
|
|
157
|
-
describe: 'mark release as a draft. no tag is created but tag_name and ' +
|
|
158
|
-
'target_commitish are associated with the release for future ' +
|
|
159
|
-
'tag creation upon "un-drafting" the release.',
|
|
222
|
+
function taggingOptions(yargs) {
|
|
223
|
+
return yargs.option('monorepo-tags', {
|
|
224
|
+
describe: 'include library name in tags and release branches',
|
|
160
225
|
type: 'boolean',
|
|
161
226
|
default: false,
|
|
162
227
|
});
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
228
|
+
}
|
|
229
|
+
const createReleasePullRequestCommand = {
|
|
230
|
+
command: 'release-pr',
|
|
231
|
+
describe: 'create or update a PR representing the next release',
|
|
232
|
+
builder(yargs) {
|
|
233
|
+
return manifestOptions(manifestConfigOptions(taggingOptions(pullRequestOptions(pullRequestStrategyOptions(gitHubOptions(yargs))))));
|
|
234
|
+
},
|
|
235
|
+
async handler(argv) {
|
|
236
|
+
const github = await buildGitHub(argv);
|
|
237
|
+
const targetBranch = argv.targetBranch || github.repository.defaultBranch;
|
|
238
|
+
let manifest;
|
|
239
|
+
if (argv.releaseType) {
|
|
240
|
+
manifest = await manifest_1.Manifest.fromConfig(github, targetBranch, {
|
|
241
|
+
releaseType: argv.releaseType,
|
|
242
|
+
component: argv.component,
|
|
243
|
+
packageName: argv.packageName,
|
|
244
|
+
draftPullRequest: argv.draftPullRequest,
|
|
245
|
+
bumpMinorPreMajor: argv.bumpMinorPreMajor,
|
|
246
|
+
bumpPatchForMinorPreMajor: argv.bumpPatchForMinorPreMajor,
|
|
247
|
+
changelogPath: argv.changelogPath,
|
|
248
|
+
changelogSections: argv.changelogSections,
|
|
249
|
+
releaseAs: argv.releaseAs,
|
|
250
|
+
versioning: argv.versioningStrategy,
|
|
251
|
+
extraFiles: argv.extraFiles,
|
|
252
|
+
versionFile: argv.versionFile,
|
|
253
|
+
includeComponentInTag: argv.monorepoTags,
|
|
254
|
+
}, extractManifestOptions(argv), argv.path);
|
|
255
|
+
}
|
|
256
|
+
else {
|
|
257
|
+
const manifestOptions = extractManifestOptions(argv);
|
|
258
|
+
manifest = await manifest_1.Manifest.fromManifest(github, targetBranch, argv.configFile, argv.manifestFile, manifestOptions);
|
|
259
|
+
}
|
|
260
|
+
if (argv.dryRun) {
|
|
261
|
+
const pullRequests = await manifest.buildPullRequests();
|
|
262
|
+
console.log(`Would open ${pullRequests.length} pull requests`);
|
|
263
|
+
console.log('fork:', manifest.fork);
|
|
264
|
+
for (const pullRequest of pullRequests) {
|
|
265
|
+
console.log('title:', pullRequest.title.toString());
|
|
266
|
+
console.log('branch:', pullRequest.headRefName);
|
|
267
|
+
console.log('draft:', pullRequest.draft);
|
|
268
|
+
console.log('body:', pullRequest.body.toString());
|
|
269
|
+
console.log('updates:', pullRequest.updates.length);
|
|
270
|
+
for (const update of pullRequest.updates) {
|
|
271
|
+
console.log(` ${update.path}: `,
|
|
272
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
273
|
+
update.updater.constructor);
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
else {
|
|
278
|
+
const pullRequestNumbers = await manifest.createPullRequests();
|
|
279
|
+
console.log(pullRequestNumbers);
|
|
280
|
+
}
|
|
281
|
+
},
|
|
282
|
+
};
|
|
283
|
+
const createReleaseCommand = {
|
|
284
|
+
command: 'github-release',
|
|
285
|
+
describe: 'create a GitHub release from a release PR',
|
|
286
|
+
builder(yargs) {
|
|
287
|
+
return releaseOptions(manifestOptions(manifestConfigOptions(taggingOptions(gitHubOptions(yargs)))));
|
|
288
|
+
},
|
|
289
|
+
async handler(argv) {
|
|
290
|
+
const github = await buildGitHub(argv);
|
|
291
|
+
const targetBranch = argv.targetBranch ||
|
|
292
|
+
argv.defaultBranch ||
|
|
293
|
+
github.repository.defaultBranch;
|
|
294
|
+
let manifest;
|
|
295
|
+
if (argv.releaseType) {
|
|
296
|
+
manifest = await manifest_1.Manifest.fromConfig(github, targetBranch, {
|
|
297
|
+
releaseType: argv.releaseType,
|
|
298
|
+
component: argv.component,
|
|
299
|
+
packageName: argv.packageName,
|
|
300
|
+
draft: argv.draft,
|
|
301
|
+
includeComponentInTag: argv.monorepoTags,
|
|
302
|
+
}, extractManifestOptions(argv), argv.path);
|
|
303
|
+
}
|
|
304
|
+
else {
|
|
305
|
+
const manifestOptions = extractManifestOptions(argv);
|
|
306
|
+
manifest = await manifest_1.Manifest.fromManifest(github, targetBranch, argv.configFile, argv.manifestFile, manifestOptions);
|
|
307
|
+
}
|
|
308
|
+
if (argv.dryRun) {
|
|
309
|
+
const releases = await manifest.buildReleases();
|
|
310
|
+
logger_1.logger.info(releases);
|
|
311
|
+
}
|
|
312
|
+
else {
|
|
313
|
+
const releaseNumbers = await manifest.createReleases();
|
|
314
|
+
console.log(releaseNumbers);
|
|
315
|
+
}
|
|
316
|
+
},
|
|
317
|
+
};
|
|
318
|
+
const createManifestPullRequestCommand = {
|
|
319
|
+
command: 'manifest-pr',
|
|
320
|
+
describe: 'create a release-PR using a manifest file',
|
|
321
|
+
deprecated: 'use release-pr instead.',
|
|
322
|
+
builder(yargs) {
|
|
323
|
+
return manifestOptions(pullRequestOptions(gitHubOptions(yargs)));
|
|
324
|
+
},
|
|
325
|
+
async handler(argv) {
|
|
326
|
+
logger_1.logger.warn('manifest-pr is deprecated. Please use release-pr instead.');
|
|
327
|
+
const github = await buildGitHub(argv);
|
|
328
|
+
const targetBranch = argv.targetBranch ||
|
|
329
|
+
argv.defaultBranch ||
|
|
330
|
+
github.repository.defaultBranch;
|
|
331
|
+
const manifestOptions = extractManifestOptions(argv);
|
|
332
|
+
const manifest = await manifest_1.Manifest.fromManifest(github, targetBranch, argv.configFile, argv.manifestFile, manifestOptions);
|
|
333
|
+
if (argv.dryRun) {
|
|
334
|
+
const pullRequests = await manifest.buildPullRequests();
|
|
335
|
+
console.log(`Would open ${pullRequests.length} pull requests`);
|
|
336
|
+
console.log('fork:', manifest.fork);
|
|
337
|
+
for (const pullRequest of pullRequests) {
|
|
338
|
+
console.log('title:', pullRequest.title.toString());
|
|
339
|
+
console.log('branch:', pullRequest.headRefName);
|
|
340
|
+
console.log('draft:', pullRequest.draft);
|
|
341
|
+
console.log('body:', pullRequest.body.toString());
|
|
342
|
+
console.log('updates:', pullRequest.updates.length);
|
|
343
|
+
for (const update of pullRequest.updates) {
|
|
344
|
+
console.log(` ${update.path}: `,
|
|
345
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
346
|
+
update.updater.constructor);
|
|
347
|
+
}
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
else {
|
|
351
|
+
const pullRequestNumbers = await manifest.createPullRequests();
|
|
352
|
+
console.log(pullRequestNumbers);
|
|
353
|
+
}
|
|
354
|
+
},
|
|
355
|
+
};
|
|
356
|
+
const createManifestReleaseCommand = {
|
|
357
|
+
command: 'manifest-release',
|
|
358
|
+
describe: 'create releases/tags from last release-PR using a manifest file',
|
|
359
|
+
deprecated: 'use github-release instead',
|
|
360
|
+
builder(yargs) {
|
|
361
|
+
return manifestOptions(releaseOptions(gitHubOptions(yargs)));
|
|
362
|
+
},
|
|
363
|
+
async handler(argv) {
|
|
364
|
+
logger_1.logger.warn('manifest-release is deprecated. Please use github-release instead.');
|
|
365
|
+
const github = await buildGitHub(argv);
|
|
366
|
+
const targetBranch = argv.targetBranch ||
|
|
367
|
+
argv.defaultBranch ||
|
|
368
|
+
github.repository.defaultBranch;
|
|
369
|
+
const manifestOptions = extractManifestOptions(argv);
|
|
370
|
+
const manifest = await manifest_1.Manifest.fromManifest(github, targetBranch, argv.configFile, argv.manifestFile, manifestOptions);
|
|
371
|
+
if (argv.dryRun) {
|
|
372
|
+
const releases = await manifest.buildReleases();
|
|
373
|
+
logger_1.logger.info(releases);
|
|
374
|
+
}
|
|
375
|
+
else {
|
|
376
|
+
const releaseNumbers = await manifest.createReleases();
|
|
377
|
+
console.log(releaseNumbers);
|
|
378
|
+
}
|
|
379
|
+
},
|
|
380
|
+
};
|
|
381
|
+
const bootstrapCommand = {
|
|
382
|
+
command: 'bootstrap',
|
|
383
|
+
describe: 'configure release manifest',
|
|
384
|
+
builder(yargs) {
|
|
385
|
+
return manifestOptions(releaseOptions(pullRequestStrategyOptions(gitHubOptions(yargs))))
|
|
386
|
+
.option('initial-version', {
|
|
387
|
+
description: 'current version',
|
|
388
|
+
})
|
|
389
|
+
.coerce('path', arg => {
|
|
390
|
+
return arg || manifest_1.ROOT_PROJECT_PATH;
|
|
391
|
+
});
|
|
392
|
+
},
|
|
393
|
+
async handler(argv) {
|
|
394
|
+
const github = await buildGitHub(argv);
|
|
395
|
+
const targetBranch = argv.targetBranch ||
|
|
396
|
+
argv.defaultBranch ||
|
|
397
|
+
github.repository.defaultBranch;
|
|
398
|
+
const bootstrapper = new bootstrapper_1.Bootstrapper(github, targetBranch, argv.manifestFile, argv.configFile, argv.initialVersion);
|
|
399
|
+
const pullRequest = await bootstrapper.bootstrap(argv.path, {
|
|
400
|
+
releaseType: argv.releaseType,
|
|
401
|
+
component: argv.component,
|
|
402
|
+
packageName: argv.packageName,
|
|
403
|
+
draft: argv.draft,
|
|
404
|
+
draftPullRequest: argv.draftPullRequest,
|
|
405
|
+
bumpMinorPreMajor: argv.bumpMinorPreMajor,
|
|
406
|
+
bumpPatchForMinorPreMajor: argv.bumpPatchForMinorPreMajor,
|
|
407
|
+
changelogPath: argv.changelogPath,
|
|
408
|
+
changelogSections: argv.changelogSections,
|
|
409
|
+
releaseAs: argv.releaseAs,
|
|
410
|
+
versioning: argv.versioningStrategy,
|
|
411
|
+
extraFiles: argv.extraFiles,
|
|
412
|
+
versionFile: argv.versionFile,
|
|
413
|
+
});
|
|
414
|
+
console.log(pullRequest);
|
|
415
|
+
},
|
|
416
|
+
};
|
|
417
|
+
async function buildGitHub(argv) {
|
|
418
|
+
const [owner, repo] = parseGithubRepoUrl(argv.repoUrl);
|
|
419
|
+
const github = await github_1.GitHub.create({
|
|
420
|
+
owner,
|
|
421
|
+
repo,
|
|
422
|
+
token: argv.token,
|
|
166
423
|
});
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
.
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
argv.token = coerce_option_1.coerceOption(argv.token);
|
|
176
|
-
if (argv.apiUrl)
|
|
177
|
-
argv.apiUrl = coerce_option_1.coerceOption(argv.apiUrl);
|
|
178
|
-
})
|
|
424
|
+
return github;
|
|
425
|
+
}
|
|
426
|
+
exports.parser = yargs
|
|
427
|
+
.command(createReleasePullRequestCommand)
|
|
428
|
+
.command(createReleaseCommand)
|
|
429
|
+
.command(createManifestPullRequestCommand)
|
|
430
|
+
.command(createManifestReleaseCommand)
|
|
431
|
+
.command(bootstrapCommand)
|
|
179
432
|
.option('debug', {
|
|
180
433
|
describe: 'print verbose errors (use only for local debugging).',
|
|
181
434
|
default: false,
|
|
182
435
|
type: 'boolean',
|
|
183
436
|
})
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
.option('api-url', {
|
|
187
|
-
describe: 'URL to use when making API requests',
|
|
188
|
-
default: constants_1.GH_API_URL,
|
|
189
|
-
type: 'string',
|
|
190
|
-
})
|
|
191
|
-
.option('default-branch', {
|
|
192
|
-
describe: 'The branch to open release PRs against and tag releases on',
|
|
193
|
-
type: 'string',
|
|
194
|
-
})
|
|
195
|
-
.option('fork', {
|
|
196
|
-
describe: 'should the PR be created from a fork',
|
|
197
|
-
type: 'boolean',
|
|
437
|
+
.option('trace', {
|
|
438
|
+
describe: 'print extra verbose errors (use only for local debugging).',
|
|
198
439
|
default: false,
|
|
440
|
+
type: 'boolean',
|
|
199
441
|
})
|
|
200
|
-
.
|
|
201
|
-
|
|
202
|
-
|
|
442
|
+
.middleware(argv => {
|
|
443
|
+
if (argv.trace) {
|
|
444
|
+
logger_1.setLogger(new logger_1.CheckpointLogger(true, true));
|
|
445
|
+
}
|
|
446
|
+
else if (argv.debug) {
|
|
447
|
+
logger_1.setLogger(new logger_1.CheckpointLogger(true));
|
|
448
|
+
}
|
|
203
449
|
})
|
|
204
450
|
.demandCommand(1)
|
|
205
451
|
.strict(true)
|
|
206
452
|
.scriptName('release-please');
|
|
453
|
+
function extractManifestOptions(argv) {
|
|
454
|
+
const manifestOptions = {};
|
|
455
|
+
if ('fork' in argv && argv.fork !== undefined) {
|
|
456
|
+
manifestOptions.fork = argv.fork;
|
|
457
|
+
}
|
|
458
|
+
if (argv.label) {
|
|
459
|
+
manifestOptions.labels = argv.label.split(',');
|
|
460
|
+
}
|
|
461
|
+
if ('releaseLabel' in argv && argv.releaseLabel) {
|
|
462
|
+
manifestOptions.releaseLabels = argv.releaseLabel.split(',');
|
|
463
|
+
}
|
|
464
|
+
if ('signoff' in argv && argv.signoff) {
|
|
465
|
+
manifestOptions.signoff = argv.signoff;
|
|
466
|
+
}
|
|
467
|
+
if ('draft' in argv && argv.draft !== undefined) {
|
|
468
|
+
manifestOptions.draft = argv.draft;
|
|
469
|
+
}
|
|
470
|
+
if ('draftPullRequest' in argv && argv.draftPullRequest !== undefined) {
|
|
471
|
+
manifestOptions.draftPullRequest = argv.draftPullRequest;
|
|
472
|
+
}
|
|
473
|
+
return manifestOptions;
|
|
474
|
+
}
|
|
207
475
|
// The errors returned by octokit currently contain the
|
|
208
476
|
// request object, this contains information we don't want to
|
|
209
477
|
// leak. For this reason, we capture exceptions and print
|
|
210
478
|
// a less verbose error message (run with --debug to output
|
|
211
479
|
// the request object, don't do this in CI/CD).
|
|
212
480
|
exports.handleError = (err) => {
|
|
213
|
-
var _a;
|
|
481
|
+
var _a, _b;
|
|
214
482
|
let status = '';
|
|
215
483
|
if (exports.handleError.yargsArgs === undefined) {
|
|
216
484
|
throw new Error('Set handleError.yargsArgs with a yargs.Arguments instance.');
|
|
217
485
|
}
|
|
218
|
-
if (!exports.handleError.logger) {
|
|
219
|
-
exports.handleError.logger = console;
|
|
220
|
-
}
|
|
221
486
|
const ya = exports.handleError.yargsArgs;
|
|
222
|
-
const
|
|
223
|
-
const command = ((
|
|
487
|
+
const errorLogger = (_a = exports.handleError.logger) !== null && _a !== void 0 ? _a : logger_1.logger;
|
|
488
|
+
const command = ((_b = ya === null || ya === void 0 ? void 0 : ya._) === null || _b === void 0 ? void 0 : _b.length) ? ya._[0] : '';
|
|
224
489
|
if (err.status) {
|
|
225
490
|
status = '' + err.status;
|
|
226
491
|
}
|
|
227
|
-
|
|
492
|
+
errorLogger.error(`command ${command} failed${status ? ` with status ${status}` : ''}`);
|
|
228
493
|
if (ya === null || ya === void 0 ? void 0 : ya.debug) {
|
|
229
|
-
logger.error('---------');
|
|
230
|
-
logger.error(err.stack);
|
|
494
|
+
logger_1.logger.error('---------');
|
|
495
|
+
logger_1.logger.error(err.stack);
|
|
231
496
|
}
|
|
232
497
|
process.exitCode = 1;
|
|
233
498
|
};
|
|
@@ -235,13 +500,15 @@ exports.handleError = (err) => {
|
|
|
235
500
|
// for the parser to be easily tested:
|
|
236
501
|
let argv;
|
|
237
502
|
if (require.main === module) {
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
503
|
+
(async () => {
|
|
504
|
+
argv = await exports.parser.parseAsync();
|
|
505
|
+
exports.handleError.yargsArgs = argv;
|
|
506
|
+
process.on('unhandledRejection', err => {
|
|
507
|
+
exports.handleError(err);
|
|
508
|
+
});
|
|
509
|
+
process.on('uncaughtException', err => {
|
|
510
|
+
exports.handleError(err);
|
|
511
|
+
});
|
|
512
|
+
})();
|
|
246
513
|
}
|
|
247
514
|
//# sourceMappingURL=release-please.js.map
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { GitHub } from './github';
|
|
2
|
+
import { ReleaserConfig } from './manifest';
|
|
3
|
+
import { PullRequest } from './pull-request';
|
|
4
|
+
export declare class Bootstrapper {
|
|
5
|
+
private github;
|
|
6
|
+
private targetBranch;
|
|
7
|
+
private manifestFile;
|
|
8
|
+
private configFile;
|
|
9
|
+
private initialVersion;
|
|
10
|
+
constructor(github: GitHub, targetBranch: string, manifestFile?: string, configFile?: string, initialVersionString?: string);
|
|
11
|
+
bootstrap(path: string, config: ReleaserConfig): Promise<PullRequest>;
|
|
12
|
+
}
|