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
|
@@ -1,162 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// Copyright 2020 Google LLC
|
|
3
|
-
//
|
|
4
|
-
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
// you may not use this file except in compliance with the License.
|
|
6
|
-
// You may obtain a copy of the License at
|
|
7
|
-
//
|
|
8
|
-
// http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
//
|
|
10
|
-
// Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
// See the License for the specific language governing permissions and
|
|
14
|
-
// limitations under the License.
|
|
15
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
-
exports.GoYoshi = void 0;
|
|
17
|
-
const release_pr_1 = require("../release-pr");
|
|
18
|
-
const conventional_commits_1 = require("../conventional-commits");
|
|
19
|
-
// Generic
|
|
20
|
-
const changelog_1 = require("../updaters/changelog");
|
|
21
|
-
const logger_1 = require("../util/logger");
|
|
22
|
-
// Commits containing a scope prefixed with an item in this array will be
|
|
23
|
-
// ignored when generating a release PR for the parent module.
|
|
24
|
-
const SUB_MODULES = [
|
|
25
|
-
'bigtable',
|
|
26
|
-
'bigquery',
|
|
27
|
-
'datastore',
|
|
28
|
-
'firestore',
|
|
29
|
-
'logging',
|
|
30
|
-
'pubsub',
|
|
31
|
-
'pubsublite',
|
|
32
|
-
'spanner',
|
|
33
|
-
'storage',
|
|
34
|
-
];
|
|
35
|
-
const REGEN_PR_REGEX = /.*auto-regenerate.*/;
|
|
36
|
-
class GoYoshi extends release_pr_1.ReleasePR {
|
|
37
|
-
constructor() {
|
|
38
|
-
super(...arguments);
|
|
39
|
-
this.changelogPath = 'CHANGES.md';
|
|
40
|
-
}
|
|
41
|
-
async _run() {
|
|
42
|
-
const packageName = await this.getPackageName();
|
|
43
|
-
const latestTag = await this.latestTag(this.monorepoTags ? `${packageName.getComponent()}-` : undefined, false);
|
|
44
|
-
let regenPR;
|
|
45
|
-
let sha = null;
|
|
46
|
-
const commits = (await this.commits({
|
|
47
|
-
sha: latestTag === null || latestTag === void 0 ? void 0 : latestTag.sha,
|
|
48
|
-
path: this.path,
|
|
49
|
-
})).filter(commit => {
|
|
50
|
-
var _a, _b;
|
|
51
|
-
// Store the very first SHA returned, this represents the HEAD of the
|
|
52
|
-
// release being created:
|
|
53
|
-
if (!sha) {
|
|
54
|
-
sha = commit.sha;
|
|
55
|
-
}
|
|
56
|
-
if (this.gh.repo === 'google-api-go-client' &&
|
|
57
|
-
REGEN_PR_REGEX.test(commit.message)) {
|
|
58
|
-
// Only have a single entry of the nightly regen listed in the changelog.
|
|
59
|
-
// If there are more than one of these commits, append associated PR.
|
|
60
|
-
const issueRe = /(?<prefix>.*)\((?<pr>.*)\)(\n|$)/;
|
|
61
|
-
if (regenPR) {
|
|
62
|
-
const match = commit.message.match(issueRe);
|
|
63
|
-
if ((_a = match === null || match === void 0 ? void 0 : match.groups) === null || _a === void 0 ? void 0 : _a.pr) {
|
|
64
|
-
regenPR.message += `\nRefs ${match.groups.pr}`;
|
|
65
|
-
}
|
|
66
|
-
return false;
|
|
67
|
-
}
|
|
68
|
-
else {
|
|
69
|
-
// Throw away the sha for nightly regens, will just append PR numbers.
|
|
70
|
-
commit.sha = null;
|
|
71
|
-
regenPR = commit;
|
|
72
|
-
const match = commit.message.match(issueRe);
|
|
73
|
-
if ((_b = match === null || match === void 0 ? void 0 : match.groups) === null || _b === void 0 ? void 0 : _b.pr) {
|
|
74
|
-
regenPR.message = `${match.groups.prefix}\n\nRefs ${match.groups.pr}`;
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
return true;
|
|
79
|
-
});
|
|
80
|
-
const cc = new conventional_commits_1.ConventionalCommits({
|
|
81
|
-
commits: commits,
|
|
82
|
-
owner: this.gh.owner,
|
|
83
|
-
repository: this.gh.repo,
|
|
84
|
-
bumpMinorPreMajor: this.bumpMinorPreMajor,
|
|
85
|
-
commitFilter: this.filterSubModuleCommits(this.gh.repo, packageName.name),
|
|
86
|
-
});
|
|
87
|
-
const candidate = await this.coerceReleaseCandidate(cc, latestTag);
|
|
88
|
-
// "closes" is a little presumptuous, let's just indicate that the
|
|
89
|
-
// PR references these other commits:
|
|
90
|
-
const changelogEntry = (await cc.generateChangelogEntry({
|
|
91
|
-
version: candidate.version,
|
|
92
|
-
currentTag: await this.normalizeTagName(candidate.version),
|
|
93
|
-
previousTag: candidate.previousTag
|
|
94
|
-
? await this.normalizeTagName(candidate.previousTag)
|
|
95
|
-
: undefined,
|
|
96
|
-
})).replace(/, closes /g, ', refs ');
|
|
97
|
-
// don't create a release candidate until user facing changes
|
|
98
|
-
// (fix, feat, BREAKING CHANGE) have been made; a CHANGELOG that's
|
|
99
|
-
// one line is a good indicator that there were no interesting commits.
|
|
100
|
-
if (this.changelogEmpty(changelogEntry)) {
|
|
101
|
-
logger_1.logger.warn(`no user facing commits found since ${latestTag ? latestTag.sha : 'beginning of time'}`);
|
|
102
|
-
return undefined;
|
|
103
|
-
}
|
|
104
|
-
const updates = [];
|
|
105
|
-
updates.push(new changelog_1.Changelog({
|
|
106
|
-
path: this.addPath(this.changelogPath),
|
|
107
|
-
changelogEntry,
|
|
108
|
-
version: candidate.version,
|
|
109
|
-
packageName: packageName.name,
|
|
110
|
-
}));
|
|
111
|
-
if (!sha) {
|
|
112
|
-
throw Error('no sha found for pull request');
|
|
113
|
-
}
|
|
114
|
-
return await this.openPR({
|
|
115
|
-
sha: sha,
|
|
116
|
-
changelogEntry,
|
|
117
|
-
updates,
|
|
118
|
-
version: candidate.version,
|
|
119
|
-
includePackageName: this.monorepoTags,
|
|
120
|
-
});
|
|
121
|
-
}
|
|
122
|
-
isGapicRepo(repo) {
|
|
123
|
-
return repo === 'google-cloud-go';
|
|
124
|
-
}
|
|
125
|
-
isMultiClientRepo(repo) {
|
|
126
|
-
return repo === 'google-cloud-go' || repo === 'google-api-go-client';
|
|
127
|
-
}
|
|
128
|
-
defaultInitialVersion() {
|
|
129
|
-
return '0.1.0';
|
|
130
|
-
}
|
|
131
|
-
tagSeparator() {
|
|
132
|
-
return '/';
|
|
133
|
-
}
|
|
134
|
-
filterSubModuleCommits(repo, packageName) {
|
|
135
|
-
return (c) => {
|
|
136
|
-
if (this.isGapicRepo(repo)) {
|
|
137
|
-
// Filter commits that don't have a scope as we don't know where to put
|
|
138
|
-
// them.
|
|
139
|
-
if (!c.scope) {
|
|
140
|
-
return true;
|
|
141
|
-
}
|
|
142
|
-
// Skipping commits related to sub-modules as they are not apart of the
|
|
143
|
-
// parent module.
|
|
144
|
-
if (!this.monorepoTags) {
|
|
145
|
-
for (const subModule of SUB_MODULES) {
|
|
146
|
-
if (c.scope === subModule || c.scope.startsWith(subModule + '/')) {
|
|
147
|
-
return true;
|
|
148
|
-
}
|
|
149
|
-
}
|
|
150
|
-
}
|
|
151
|
-
else {
|
|
152
|
-
if (!(c.scope === packageName || c.scope.startsWith(packageName + '/'))) {
|
|
153
|
-
return true;
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
}
|
|
157
|
-
return false;
|
|
158
|
-
};
|
|
159
|
-
}
|
|
160
|
-
}
|
|
161
|
-
exports.GoYoshi = GoYoshi;
|
|
162
|
-
//# sourceMappingURL=go-yoshi.js.map
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { ReleasePR, ReleaseCandidate, PackageName } from '../release-pr';
|
|
2
|
-
import { Update } from '../updaters/update';
|
|
3
|
-
export declare class Go extends ReleasePR {
|
|
4
|
-
enableSimplePrereleaseParsing: boolean;
|
|
5
|
-
protected buildUpdates(changelogEntry: string, candidate: ReleaseCandidate, packageName: PackageName): Promise<Update[]>;
|
|
6
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { ReleasePR, ReleaseCandidate, PackageName } from '../release-pr';
|
|
2
|
-
import { Update } from '../updaters/update';
|
|
3
|
-
export declare class Helm extends ReleasePR {
|
|
4
|
-
private chartYmlContents?;
|
|
5
|
-
private _packageName?;
|
|
6
|
-
protected buildUpdates(changelogEntry: string, candidate: ReleaseCandidate, packageName: PackageName): Promise<Update[]>;
|
|
7
|
-
getPackageName(): Promise<PackageName>;
|
|
8
|
-
private getChartYmlContents;
|
|
9
|
-
}
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// Copyright 2021 Google LLC
|
|
3
|
-
//
|
|
4
|
-
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
// you may not use this file except in compliance with the License.
|
|
6
|
-
// You may obtain a copy of the License at
|
|
7
|
-
//
|
|
8
|
-
// http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
//
|
|
10
|
-
// Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
// See the License for the specific language governing permissions and
|
|
14
|
-
// limitations under the License.
|
|
15
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
-
exports.Helm = void 0;
|
|
17
|
-
const release_pr_1 = require("../release-pr");
|
|
18
|
-
// Generic
|
|
19
|
-
const changelog_1 = require("../updaters/changelog");
|
|
20
|
-
const yaml = require("js-yaml");
|
|
21
|
-
// helm
|
|
22
|
-
const chart_yaml_1 = require("../updaters/helm/chart-yaml");
|
|
23
|
-
class Helm extends release_pr_1.ReleasePR {
|
|
24
|
-
async buildUpdates(changelogEntry, candidate, packageName) {
|
|
25
|
-
const updates = [];
|
|
26
|
-
updates.push(new changelog_1.Changelog({
|
|
27
|
-
path: this.addPath(this.changelogPath),
|
|
28
|
-
changelogEntry,
|
|
29
|
-
version: candidate.version,
|
|
30
|
-
packageName: packageName.name,
|
|
31
|
-
}));
|
|
32
|
-
updates.push(new chart_yaml_1.ChartYaml({
|
|
33
|
-
path: this.addPath('Chart.yaml'),
|
|
34
|
-
changelogEntry,
|
|
35
|
-
version: candidate.version,
|
|
36
|
-
packageName: packageName.name,
|
|
37
|
-
contents: await this.getChartYmlContents(),
|
|
38
|
-
}));
|
|
39
|
-
return updates;
|
|
40
|
-
}
|
|
41
|
-
async getPackageName() {
|
|
42
|
-
var _a;
|
|
43
|
-
if (this._packageName === undefined) {
|
|
44
|
-
const chartYmlContents = await this.getChartYmlContents();
|
|
45
|
-
const chart = yaml.load(chartYmlContents.parsedContent, { json: true });
|
|
46
|
-
if (typeof chart === 'object') {
|
|
47
|
-
this.packageName = this._packageName = (_a = chart.name) !== null && _a !== void 0 ? _a : this.packageName;
|
|
48
|
-
}
|
|
49
|
-
else {
|
|
50
|
-
this._packageName = this.packageName;
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
return {
|
|
54
|
-
name: this.packageName,
|
|
55
|
-
getComponent: () => this.packageName,
|
|
56
|
-
};
|
|
57
|
-
}
|
|
58
|
-
async getChartYmlContents() {
|
|
59
|
-
if (!this.chartYmlContents) {
|
|
60
|
-
this.chartYmlContents = await this.gh.getFileContents(this.addPath('Chart.yaml'));
|
|
61
|
-
}
|
|
62
|
-
return this.chartYmlContents;
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
exports.Helm = Helm;
|
|
66
|
-
//# sourceMappingURL=helm.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { ReleasePR } from '../release-pr';
|
|
2
|
-
export declare type ReleaseType = 'go' | 'go-yoshi' | 'java-backport' | 'java-bom' | 'java-lts' | 'java-yoshi' | 'krm-blueprint' | 'node' | 'ocaml' | 'php' | 'php-yoshi' | 'python' | 'ruby' | 'ruby-yoshi' | 'rust' | 'simple' | 'terraform-module' | 'helm' | 'elixir' | 'dart';
|
|
3
|
-
declare type Releasers = Record<ReleaseType, typeof ReleasePR>;
|
|
4
|
-
export declare function getReleasers(): Releasers;
|
|
5
|
-
export declare function getReleaserNames(): string[];
|
|
6
|
-
export declare function getReleaserTypes(): readonly ReleaseType[];
|
|
7
|
-
export {};
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// Copyright 2019 Google LLC
|
|
3
|
-
//
|
|
4
|
-
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
// you may not use this file except in compliance with the License.
|
|
6
|
-
// You may obtain a copy of the License at
|
|
7
|
-
//
|
|
8
|
-
// http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
//
|
|
10
|
-
// Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
// See the License for the specific language governing permissions and
|
|
14
|
-
// limitations under the License.
|
|
15
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
-
exports.getReleaserTypes = exports.getReleaserNames = exports.getReleasers = void 0;
|
|
17
|
-
const go_1 = require("./go");
|
|
18
|
-
const go_yoshi_1 = require("./go-yoshi");
|
|
19
|
-
const java_bom_1 = require("./java-bom");
|
|
20
|
-
const java_lts_1 = require("./java-lts");
|
|
21
|
-
const java_yoshi_1 = require("./java-yoshi");
|
|
22
|
-
const krm_blueprint_1 = require("./krm-blueprint");
|
|
23
|
-
const node_1 = require("./node");
|
|
24
|
-
const php_1 = require("./php");
|
|
25
|
-
const php_yoshi_1 = require("./php-yoshi");
|
|
26
|
-
const python_1 = require("./python");
|
|
27
|
-
const ruby_yoshi_1 = require("./ruby-yoshi");
|
|
28
|
-
const ruby_1 = require("./ruby");
|
|
29
|
-
const simple_1 = require("./simple");
|
|
30
|
-
const terraform_module_1 = require("./terraform-module");
|
|
31
|
-
const rust_1 = require("./rust");
|
|
32
|
-
const ocaml_1 = require("./ocaml");
|
|
33
|
-
const helm_1 = require("./helm");
|
|
34
|
-
const elixir_1 = require("./elixir");
|
|
35
|
-
const java_backport_1 = require("./java-backport");
|
|
36
|
-
const dart_1 = require("./dart");
|
|
37
|
-
const releasers = {
|
|
38
|
-
go: go_1.Go,
|
|
39
|
-
'go-yoshi': go_yoshi_1.GoYoshi,
|
|
40
|
-
'java-backport': java_backport_1.JavaBackport,
|
|
41
|
-
'java-bom': java_bom_1.JavaBom,
|
|
42
|
-
'java-lts': java_lts_1.JavaLTS,
|
|
43
|
-
'java-yoshi': java_yoshi_1.JavaYoshi,
|
|
44
|
-
'krm-blueprint': krm_blueprint_1.KRMBlueprint,
|
|
45
|
-
node: node_1.Node,
|
|
46
|
-
ocaml: ocaml_1.OCaml,
|
|
47
|
-
php: php_1.PHP,
|
|
48
|
-
'php-yoshi': php_yoshi_1.PHPYoshi,
|
|
49
|
-
python: python_1.Python,
|
|
50
|
-
ruby: ruby_1.Ruby,
|
|
51
|
-
'ruby-yoshi': ruby_yoshi_1.RubyYoshi,
|
|
52
|
-
rust: rust_1.Rust,
|
|
53
|
-
simple: simple_1.Simple,
|
|
54
|
-
'terraform-module': terraform_module_1.TerraformModule,
|
|
55
|
-
helm: helm_1.Helm,
|
|
56
|
-
elixir: elixir_1.Elixir,
|
|
57
|
-
dart: dart_1.Dart,
|
|
58
|
-
};
|
|
59
|
-
function getReleasers() {
|
|
60
|
-
return releasers;
|
|
61
|
-
}
|
|
62
|
-
exports.getReleasers = getReleasers;
|
|
63
|
-
// deprecated, use getReleaserTypes
|
|
64
|
-
function getReleaserNames() {
|
|
65
|
-
return getReleaserTypes();
|
|
66
|
-
}
|
|
67
|
-
exports.getReleaserNames = getReleaserNames;
|
|
68
|
-
function getReleaserTypes() {
|
|
69
|
-
const names = [];
|
|
70
|
-
for (const releaseType of Object.keys(releasers)) {
|
|
71
|
-
names.push(releaseType);
|
|
72
|
-
}
|
|
73
|
-
return names;
|
|
74
|
-
}
|
|
75
|
-
exports.getReleaserTypes = getReleaserTypes;
|
|
76
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import * as semver from 'semver';
|
|
2
|
-
export declare type BumpType = 'major' | 'minor' | 'patch' | 'snapshot' | 'lts' | 'lts-snapshot';
|
|
3
|
-
export declare function maxBumpType(bumpTypes: BumpType[]): BumpType;
|
|
4
|
-
export declare function fromSemverReleaseType(releaseType: semver.ReleaseType): "patch" | "major" | "minor";
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// Copyright 2020 Google LLC
|
|
3
|
-
//
|
|
4
|
-
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
// you may not use this file except in compliance with the License.
|
|
6
|
-
// You may obtain a copy of the License at
|
|
7
|
-
//
|
|
8
|
-
// http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
//
|
|
10
|
-
// Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
// See the License for the specific language governing permissions and
|
|
14
|
-
// limitations under the License.
|
|
15
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
-
exports.fromSemverReleaseType = exports.maxBumpType = void 0;
|
|
17
|
-
function maxBumpType(bumpTypes) {
|
|
18
|
-
if (bumpTypes.some(bumpType => bumpType === 'major')) {
|
|
19
|
-
return 'major';
|
|
20
|
-
}
|
|
21
|
-
if (bumpTypes.some(bumpType => bumpType === 'minor')) {
|
|
22
|
-
return 'minor';
|
|
23
|
-
}
|
|
24
|
-
return 'patch';
|
|
25
|
-
}
|
|
26
|
-
exports.maxBumpType = maxBumpType;
|
|
27
|
-
function fromSemverReleaseType(releaseType) {
|
|
28
|
-
switch (releaseType) {
|
|
29
|
-
case 'major':
|
|
30
|
-
case 'minor':
|
|
31
|
-
case 'patch':
|
|
32
|
-
return releaseType;
|
|
33
|
-
default:
|
|
34
|
-
throw Error(`unsupported release type ${releaseType}`);
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
exports.fromSemverReleaseType = fromSemverReleaseType;
|
|
38
|
-
//# sourceMappingURL=bump_type.js.map
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// Copyright 2020 Google LLC
|
|
3
|
-
//
|
|
4
|
-
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
// you may not use this file except in compliance with the License.
|
|
6
|
-
// You may obtain a copy of the License at
|
|
7
|
-
//
|
|
8
|
-
// http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
//
|
|
10
|
-
// Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
// See the License for the specific language governing permissions and
|
|
14
|
-
// limitations under the License.
|
|
15
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
-
exports.isStableArtifact = void 0;
|
|
17
|
-
const VERSIONED_ARTIFACT_REGEX = /^.*-(v\d+[^-]*)$/;
|
|
18
|
-
const VERSION_REGEX = /^v\d+(.*)$/;
|
|
19
|
-
/**
|
|
20
|
-
* Returns true if the artifact should be considered stable
|
|
21
|
-
* @param artifact name of the artifact to check
|
|
22
|
-
*/
|
|
23
|
-
function isStableArtifact(artifact) {
|
|
24
|
-
const match = artifact.match(VERSIONED_ARTIFACT_REGEX);
|
|
25
|
-
if (!match) {
|
|
26
|
-
// The artifact does not have a version qualifier at the end
|
|
27
|
-
return true;
|
|
28
|
-
}
|
|
29
|
-
const versionMatch = match[1].match(VERSION_REGEX);
|
|
30
|
-
if (versionMatch && versionMatch[1]) {
|
|
31
|
-
// The version is not stable (probably alpha/beta/rc)
|
|
32
|
-
return false;
|
|
33
|
-
}
|
|
34
|
-
return true;
|
|
35
|
-
}
|
|
36
|
-
exports.isStableArtifact = isStableArtifact;
|
|
37
|
-
//# sourceMappingURL=stability.js.map
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { BumpType } from './bump_type';
|
|
2
|
-
export declare class Version {
|
|
3
|
-
major: number;
|
|
4
|
-
minor: number;
|
|
5
|
-
patch: number;
|
|
6
|
-
extra: string;
|
|
7
|
-
snapshot: boolean;
|
|
8
|
-
lts?: number;
|
|
9
|
-
constructor(major: number, minor: number, patch: number, extra: string, snapshot: boolean, lts?: number);
|
|
10
|
-
static parse(version: string): Version;
|
|
11
|
-
bump(bumpType: BumpType): Version;
|
|
12
|
-
toString(): string;
|
|
13
|
-
}
|
|
@@ -1,112 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// Copyright 2020 Google LLC
|
|
3
|
-
//
|
|
4
|
-
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
// you may not use this file except in compliance with the License.
|
|
6
|
-
// You may obtain a copy of the License at
|
|
7
|
-
//
|
|
8
|
-
// http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
//
|
|
10
|
-
// Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
// See the License for the specific language governing permissions and
|
|
14
|
-
// limitations under the License.
|
|
15
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
-
exports.Version = void 0;
|
|
17
|
-
const VERSION_REGEX = /(\d+)\.(\d+)\.(\d+)(-.+)?/;
|
|
18
|
-
const LTS_REGEX = /(-.+)?-sp.(\d+)/;
|
|
19
|
-
class Version {
|
|
20
|
-
constructor(major, minor, patch, extra, snapshot, lts) {
|
|
21
|
-
this.major = major;
|
|
22
|
-
this.minor = minor;
|
|
23
|
-
this.patch = patch;
|
|
24
|
-
this.extra = extra;
|
|
25
|
-
this.snapshot = snapshot;
|
|
26
|
-
this.lts = lts;
|
|
27
|
-
}
|
|
28
|
-
static parse(version) {
|
|
29
|
-
var _a;
|
|
30
|
-
let extra = '';
|
|
31
|
-
let snapshot = false;
|
|
32
|
-
if (version.endsWith('-SNAPSHOT')) {
|
|
33
|
-
snapshot = true;
|
|
34
|
-
version = version.slice(0, -9);
|
|
35
|
-
}
|
|
36
|
-
const match = version.match(VERSION_REGEX);
|
|
37
|
-
if (!match) {
|
|
38
|
-
throw Error(`unable to parse version string: ${version}`);
|
|
39
|
-
}
|
|
40
|
-
const major = Number(match[1]);
|
|
41
|
-
const minor = Number(match[2]);
|
|
42
|
-
const patch = Number(match[3]);
|
|
43
|
-
let lts = undefined;
|
|
44
|
-
if (match[4]) {
|
|
45
|
-
const ltsMatch = match[4].match(LTS_REGEX);
|
|
46
|
-
if (ltsMatch && ltsMatch[2]) {
|
|
47
|
-
extra = (_a = ltsMatch[1]) !== null && _a !== void 0 ? _a : '';
|
|
48
|
-
lts = Number(ltsMatch[2]);
|
|
49
|
-
}
|
|
50
|
-
else {
|
|
51
|
-
extra = match[4];
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
return new Version(major, minor, patch, extra, snapshot, lts);
|
|
55
|
-
}
|
|
56
|
-
bump(bumpType) {
|
|
57
|
-
switch (bumpType) {
|
|
58
|
-
case 'major':
|
|
59
|
-
this.major += 1;
|
|
60
|
-
this.minor = 0;
|
|
61
|
-
this.patch = 0;
|
|
62
|
-
this.snapshot = false;
|
|
63
|
-
break;
|
|
64
|
-
case 'minor':
|
|
65
|
-
this.minor += 1;
|
|
66
|
-
this.patch = 0;
|
|
67
|
-
this.snapshot = false;
|
|
68
|
-
break;
|
|
69
|
-
case 'patch':
|
|
70
|
-
this.patch += 1;
|
|
71
|
-
this.snapshot = false;
|
|
72
|
-
break;
|
|
73
|
-
case 'snapshot':
|
|
74
|
-
if (this.lts) {
|
|
75
|
-
this.lts += 1;
|
|
76
|
-
}
|
|
77
|
-
else {
|
|
78
|
-
this.patch += 1;
|
|
79
|
-
}
|
|
80
|
-
this.snapshot = true;
|
|
81
|
-
break;
|
|
82
|
-
case 'lts':
|
|
83
|
-
if (this.lts) {
|
|
84
|
-
if (!this.snapshot) {
|
|
85
|
-
this.lts += 1;
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
else {
|
|
89
|
-
this.lts = 1;
|
|
90
|
-
}
|
|
91
|
-
this.snapshot = false;
|
|
92
|
-
break;
|
|
93
|
-
case 'lts-snapshot':
|
|
94
|
-
if (this.lts) {
|
|
95
|
-
this.lts += 1;
|
|
96
|
-
}
|
|
97
|
-
else {
|
|
98
|
-
this.lts = 1;
|
|
99
|
-
}
|
|
100
|
-
this.snapshot = true;
|
|
101
|
-
break;
|
|
102
|
-
default:
|
|
103
|
-
throw Error(`unsupported bump type: ${bumpType}`);
|
|
104
|
-
}
|
|
105
|
-
return this;
|
|
106
|
-
}
|
|
107
|
-
toString() {
|
|
108
|
-
return `${this.major}.${this.minor}.${this.patch}${this.extra}${this.lts ? `-sp.${this.lts}` : ''}${this.snapshot ? '-SNAPSHOT' : ''}`;
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
exports.Version = Version;
|
|
112
|
-
//# sourceMappingURL=version.js.map
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { ReleaseCandidate } from '../release-pr';
|
|
2
|
-
import { ConventionalCommits } from '../conventional-commits';
|
|
3
|
-
import { GitHubTag } from '../github';
|
|
4
|
-
import { VersionsMap } from '../updaters/update';
|
|
5
|
-
import { JavaYoshi } from './java-yoshi';
|
|
6
|
-
export declare class JavaBackport extends JavaYoshi {
|
|
7
|
-
protected coerceVersions(_cc: ConventionalCommits, _candidate: ReleaseCandidate, _latestTag: GitHubTag | undefined, currentVersions: VersionsMap): Promise<VersionsMap>;
|
|
8
|
-
protected coerceReleaseCandidate(cc: ConventionalCommits, latestTag: GitHubTag | undefined, _preRelease?: boolean): Promise<ReleaseCandidate>;
|
|
9
|
-
}
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// Copyright 2021 Google LLC
|
|
3
|
-
//
|
|
4
|
-
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
// you may not use this file except in compliance with the License.
|
|
6
|
-
// You may obtain a copy of the License at
|
|
7
|
-
//
|
|
8
|
-
// http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
//
|
|
10
|
-
// Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
// See the License for the specific language governing permissions and
|
|
14
|
-
// limitations under the License.
|
|
15
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
-
exports.JavaBackport = void 0;
|
|
17
|
-
// Java
|
|
18
|
-
const version_1 = require("./java/version");
|
|
19
|
-
const java_yoshi_1 = require("./java-yoshi");
|
|
20
|
-
// This release strategy always bumps the patch version
|
|
21
|
-
class JavaBackport extends java_yoshi_1.JavaYoshi {
|
|
22
|
-
async coerceVersions(_cc, _candidate, _latestTag, currentVersions) {
|
|
23
|
-
const bumpType = this.snapshot ? 'snapshot' : 'patch';
|
|
24
|
-
const newVersions = new Map();
|
|
25
|
-
for (const [k, version] of currentVersions) {
|
|
26
|
-
newVersions.set(k, version_1.Version.parse(version).bump(bumpType).toString());
|
|
27
|
-
}
|
|
28
|
-
return newVersions;
|
|
29
|
-
}
|
|
30
|
-
async coerceReleaseCandidate(cc, latestTag, _preRelease = false) {
|
|
31
|
-
var _a;
|
|
32
|
-
const bumpType = this.snapshot ? 'snapshot' : 'patch';
|
|
33
|
-
const version = version_1.Version.parse((_a = latestTag === null || latestTag === void 0 ? void 0 : latestTag.version) !== null && _a !== void 0 ? _a : this.defaultInitialVersion())
|
|
34
|
-
.bump(bumpType)
|
|
35
|
-
.toString();
|
|
36
|
-
return {
|
|
37
|
-
previousTag: latestTag === null || latestTag === void 0 ? void 0 : latestTag.version,
|
|
38
|
-
version,
|
|
39
|
-
};
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
exports.JavaBackport = JavaBackport;
|
|
43
|
-
//# sourceMappingURL=java-backport.js.map
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { ReleaseCandidate } from '../release-pr';
|
|
2
|
-
import { ConventionalCommits } from '../conventional-commits';
|
|
3
|
-
import { GitHubTag } from '../github';
|
|
4
|
-
import { VersionsMap } from '../updaters/update';
|
|
5
|
-
import { Commit } from '../graphql-to-commits';
|
|
6
|
-
import { BumpType } from './java/bump_type';
|
|
7
|
-
import { JavaYoshi } from './java-yoshi';
|
|
8
|
-
export declare class JavaBom extends JavaYoshi {
|
|
9
|
-
private bumpType?;
|
|
10
|
-
protected coerceVersions(cc: ConventionalCommits, _candidate: ReleaseCandidate, latestTag: GitHubTag | undefined, currentVersions: VersionsMap): Promise<VersionsMap>;
|
|
11
|
-
private getBumpType;
|
|
12
|
-
protected coerceReleaseCandidate(cc: ConventionalCommits, latestTag: GitHubTag | undefined, _preRelease?: boolean): Promise<ReleaseCandidate>;
|
|
13
|
-
static dependencyUpdates(commits: Commit[]): VersionsMap;
|
|
14
|
-
static isNonPatchVersion(commit: Commit): boolean;
|
|
15
|
-
static determineBumpType(commits: Commit[]): BumpType;
|
|
16
|
-
}
|