release-please 12.3.0 → 13.0.0-candidate.0
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 +21 -0
- package/README.md +5 -0
- package/build/src/bin/release-please.d.ts +51 -11
- package/build/src/bin/release-please.js +409 -150
- package/build/src/bootstrapper.d.ts +12 -0
- package/build/src/bootstrapper.js +60 -0
- 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 +159 -150
- package/build/src/github.d.ts +151 -883
- package/build/src/github.js +584 -1013
- package/build/src/manifest.d.ts +177 -48
- package/build/src/manifest.js +583 -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/readme.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/{updaters/java/pom-xml.js → release-pull-request.js} +2 -7
- 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 +9 -0
- package/build/src/strategies/php-yoshi.js +214 -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 +99 -0
- package/build/src/strategy.js +237 -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/dart/pubspec-yaml.js +45 -0
- 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/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 -72
- 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-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/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,304 +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.JavaYoshi = void 0;
|
|
17
|
-
const branch_name_1 = require("../util/branch-name");
|
|
18
|
-
const pull_request_title_1 = require("../util/pull-request-title");
|
|
19
|
-
const versions_manifest_1 = require("../updaters/java/versions-manifest");
|
|
20
|
-
const conventional_commits_1 = require("../conventional-commits");
|
|
21
|
-
const version_1 = require("./java/version");
|
|
22
|
-
const release_pr_1 = require("../release-pr");
|
|
23
|
-
const changelog_1 = require("../updaters/changelog");
|
|
24
|
-
const readme_1 = require("../updaters/java/readme");
|
|
25
|
-
const google_utils_1 = require("../updaters/java/google-utils");
|
|
26
|
-
const pom_xml_1 = require("../updaters/java/pom-xml");
|
|
27
|
-
const java_update_1 = require("../updaters/java/java_update");
|
|
28
|
-
const stability_1 = require("./java/stability");
|
|
29
|
-
const bump_type_1 = require("./java/bump_type");
|
|
30
|
-
const logger_1 = require("../util/logger");
|
|
31
|
-
const errors_1 = require("../errors");
|
|
32
|
-
const CHANGELOG_SECTIONS = [
|
|
33
|
-
{ type: 'feat', section: 'Features' },
|
|
34
|
-
{ type: 'fix', section: 'Bug Fixes' },
|
|
35
|
-
{ type: 'perf', section: 'Performance Improvements' },
|
|
36
|
-
{ type: 'deps', section: 'Dependencies' },
|
|
37
|
-
{ type: 'revert', section: 'Reverts' },
|
|
38
|
-
{ type: 'docs', section: 'Documentation' },
|
|
39
|
-
{ type: 'style', section: 'Styles', hidden: true },
|
|
40
|
-
{ type: 'chore', section: 'Miscellaneous Chores', hidden: true },
|
|
41
|
-
{ type: 'refactor', section: 'Code Refactoring', hidden: true },
|
|
42
|
-
{ type: 'test', section: 'Tests', hidden: true },
|
|
43
|
-
{ type: 'build', section: 'Build System', hidden: true },
|
|
44
|
-
{ type: 'ci', section: 'Continuous Integration', hidden: true },
|
|
45
|
-
];
|
|
46
|
-
class JavaYoshi extends release_pr_1.ReleasePR {
|
|
47
|
-
async getVersionManifestContent() {
|
|
48
|
-
if (!this.versionsManifestContent) {
|
|
49
|
-
try {
|
|
50
|
-
this.versionsManifestContent = await this.gh.getFileContents('versions.txt');
|
|
51
|
-
}
|
|
52
|
-
catch (e) {
|
|
53
|
-
if (e instanceof errors_1.GitHubAPIError) {
|
|
54
|
-
if (e.status === 404) {
|
|
55
|
-
// on missing file, throw a configuration error
|
|
56
|
-
throw new errors_1.MissingRequiredFileError('versions.txt', JavaYoshi.name, this.gh.repo);
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
throw e;
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
return this.versionsManifestContent;
|
|
63
|
-
}
|
|
64
|
-
async _run() {
|
|
65
|
-
const versionsManifestContent = await this.getVersionManifestContent();
|
|
66
|
-
const currentVersions = versions_manifest_1.VersionsManifest.parseVersions(versionsManifestContent.parsedContent);
|
|
67
|
-
const snapshotNeeded = versions_manifest_1.VersionsManifest.needsSnapshot(versionsManifestContent.parsedContent);
|
|
68
|
-
if (!this.snapshot) {
|
|
69
|
-
// if a snapshot is not explicitly requested, decided what type
|
|
70
|
-
// of release based on whether a snapshot is needed or not
|
|
71
|
-
this.snapshot = snapshotNeeded;
|
|
72
|
-
}
|
|
73
|
-
else if (!snapshotNeeded) {
|
|
74
|
-
logger_1.logger.warn('release asked for a snapshot, but no snapshot is needed');
|
|
75
|
-
return undefined;
|
|
76
|
-
}
|
|
77
|
-
if (this.snapshot) {
|
|
78
|
-
this.labels = ['type: process'];
|
|
79
|
-
}
|
|
80
|
-
const latestTag = await this.latestTag();
|
|
81
|
-
const commits = this.snapshot
|
|
82
|
-
? [
|
|
83
|
-
{
|
|
84
|
-
sha: 'abc123',
|
|
85
|
-
message: 'fix: ',
|
|
86
|
-
files: [],
|
|
87
|
-
},
|
|
88
|
-
]
|
|
89
|
-
: await this.commits({
|
|
90
|
-
sha: latestTag ? latestTag.sha : undefined,
|
|
91
|
-
labels: true,
|
|
92
|
-
});
|
|
93
|
-
if (commits.length === 0) {
|
|
94
|
-
logger_1.logger.warn(`no commits found since ${latestTag ? latestTag.sha : 'beginning of time'}`);
|
|
95
|
-
return undefined;
|
|
96
|
-
}
|
|
97
|
-
let prSHA = commits[0].sha;
|
|
98
|
-
// Snapshots populate a fake "fix:"" commit, so that they will always
|
|
99
|
-
// result in a patch update. We still need to know the HEAD sba, so that
|
|
100
|
-
// we can use this as a starting point for the snapshot PR:
|
|
101
|
-
if (this.snapshot && (latestTag === null || latestTag === void 0 ? void 0 : latestTag.sha)) {
|
|
102
|
-
const latestCommit = (await this.commits({
|
|
103
|
-
sha: latestTag.sha,
|
|
104
|
-
perPage: 1,
|
|
105
|
-
labels: true,
|
|
106
|
-
}))[0];
|
|
107
|
-
prSHA = latestCommit ? latestCommit.sha : latestTag.sha;
|
|
108
|
-
}
|
|
109
|
-
const cc = new conventional_commits_1.ConventionalCommits({
|
|
110
|
-
commits,
|
|
111
|
-
owner: this.gh.owner,
|
|
112
|
-
repository: this.gh.repo,
|
|
113
|
-
bumpMinorPreMajor: this.bumpMinorPreMajor,
|
|
114
|
-
changelogSections: CHANGELOG_SECTIONS,
|
|
115
|
-
});
|
|
116
|
-
const candidate = await this.coerceReleaseCandidate(cc, latestTag);
|
|
117
|
-
const candidateVersions = await this.coerceVersions(cc, candidate, latestTag, currentVersions);
|
|
118
|
-
const changelogEntry = await this.generateChangelog(cc, candidate);
|
|
119
|
-
// don't create a release candidate until user facing changes
|
|
120
|
-
// (fix, feat, BREAKING CHANGE) have been made; a CHANGELOG that's
|
|
121
|
-
// one line is a good indicator that there were no interesting commits.
|
|
122
|
-
if (this.changelogEmpty(changelogEntry) && !this.snapshot) {
|
|
123
|
-
logger_1.logger.warn(`no user facing commits found since ${latestTag ? latestTag.sha : 'beginning of time'}`);
|
|
124
|
-
return undefined;
|
|
125
|
-
}
|
|
126
|
-
const packageName = await this.getPackageName();
|
|
127
|
-
const updates = await this.buildJavaUpdates(changelogEntry, candidateVersions, candidate, packageName);
|
|
128
|
-
return await this.openPR({
|
|
129
|
-
sha: prSHA,
|
|
130
|
-
changelogEntry: `${changelogEntry}\n---\n`,
|
|
131
|
-
updates,
|
|
132
|
-
version: candidate.version,
|
|
133
|
-
includePackageName: this.monorepoTags,
|
|
134
|
-
});
|
|
135
|
-
}
|
|
136
|
-
async generateChangelog(cc, candidate) {
|
|
137
|
-
if (this.snapshot) {
|
|
138
|
-
return '### Updating meta-information for bleeding-edge SNAPSHOT release.';
|
|
139
|
-
}
|
|
140
|
-
return await cc.generateChangelogEntry({
|
|
141
|
-
version: candidate.version,
|
|
142
|
-
currentTag: `v${candidate.version}`,
|
|
143
|
-
previousTag: candidate.previousTag,
|
|
144
|
-
});
|
|
145
|
-
}
|
|
146
|
-
async coerceReleaseCandidate(cc, latestTag, preRelease = false) {
|
|
147
|
-
var _a;
|
|
148
|
-
if (this.snapshot) {
|
|
149
|
-
const version = version_1.Version.parse((_a = latestTag === null || latestTag === void 0 ? void 0 : latestTag.version) !== null && _a !== void 0 ? _a : this.defaultInitialVersion())
|
|
150
|
-
.bump('snapshot')
|
|
151
|
-
.toString();
|
|
152
|
-
return {
|
|
153
|
-
previousTag: latestTag === null || latestTag === void 0 ? void 0 : latestTag.version,
|
|
154
|
-
version,
|
|
155
|
-
};
|
|
156
|
-
}
|
|
157
|
-
return await super.coerceReleaseCandidate(cc, latestTag, preRelease);
|
|
158
|
-
}
|
|
159
|
-
async buildJavaUpdates(changelogEntry, candidateVersions, candidate, packageName) {
|
|
160
|
-
const updates = [];
|
|
161
|
-
if (!this.snapshot) {
|
|
162
|
-
updates.push(new changelog_1.Changelog({
|
|
163
|
-
path: this.changelogPath,
|
|
164
|
-
changelogEntry,
|
|
165
|
-
versions: candidateVersions,
|
|
166
|
-
version: candidate.version,
|
|
167
|
-
packageName: packageName.name,
|
|
168
|
-
}));
|
|
169
|
-
updates.push(new readme_1.Readme({
|
|
170
|
-
path: 'README.md',
|
|
171
|
-
changelogEntry,
|
|
172
|
-
versions: candidateVersions,
|
|
173
|
-
version: candidate.version,
|
|
174
|
-
packageName: packageName.name,
|
|
175
|
-
}));
|
|
176
|
-
updates.push(new google_utils_1.GoogleUtils({
|
|
177
|
-
// TODO(@chingor): should this use search like pom.xml?
|
|
178
|
-
path: 'google-api-client/src/main/java/com/google/api/client/googleapis/GoogleUtils.java',
|
|
179
|
-
changelogEntry,
|
|
180
|
-
versions: candidateVersions,
|
|
181
|
-
version: candidate.version,
|
|
182
|
-
packageName: packageName.name,
|
|
183
|
-
}));
|
|
184
|
-
}
|
|
185
|
-
updates.push(new versions_manifest_1.VersionsManifest({
|
|
186
|
-
path: 'versions.txt',
|
|
187
|
-
changelogEntry,
|
|
188
|
-
versions: candidateVersions,
|
|
189
|
-
version: candidate.version,
|
|
190
|
-
packageName: packageName.name,
|
|
191
|
-
contents: await this.getVersionManifestContent(),
|
|
192
|
-
}));
|
|
193
|
-
const pomFilesSearch = this.gh.findFilesByFilename('pom.xml');
|
|
194
|
-
const buildFilesSearch = this.gh.findFilesByFilename('build.gradle');
|
|
195
|
-
const dependenciesSearch = this.gh.findFilesByFilename('dependencies.properties');
|
|
196
|
-
const pomFiles = await pomFilesSearch;
|
|
197
|
-
pomFiles.forEach(path => {
|
|
198
|
-
updates.push(new pom_xml_1.PomXML({
|
|
199
|
-
path,
|
|
200
|
-
changelogEntry,
|
|
201
|
-
versions: candidateVersions,
|
|
202
|
-
version: candidate.version,
|
|
203
|
-
packageName: packageName.name,
|
|
204
|
-
}));
|
|
205
|
-
});
|
|
206
|
-
const buildFiles = await buildFilesSearch;
|
|
207
|
-
buildFiles.forEach(path => {
|
|
208
|
-
updates.push(new java_update_1.JavaUpdate({
|
|
209
|
-
path,
|
|
210
|
-
changelogEntry,
|
|
211
|
-
versions: candidateVersions,
|
|
212
|
-
version: candidate.version,
|
|
213
|
-
packageName: packageName.name,
|
|
214
|
-
}));
|
|
215
|
-
});
|
|
216
|
-
const dependenciesFiles = await dependenciesSearch;
|
|
217
|
-
dependenciesFiles.forEach(path => {
|
|
218
|
-
updates.push(new java_update_1.JavaUpdate({
|
|
219
|
-
path,
|
|
220
|
-
changelogEntry,
|
|
221
|
-
versions: candidateVersions,
|
|
222
|
-
version: candidate.version,
|
|
223
|
-
packageName: packageName.name,
|
|
224
|
-
}));
|
|
225
|
-
});
|
|
226
|
-
this.extraFiles.forEach(path => {
|
|
227
|
-
updates.push(new java_update_1.JavaUpdate({
|
|
228
|
-
path,
|
|
229
|
-
changelogEntry,
|
|
230
|
-
versions: candidateVersions,
|
|
231
|
-
version: candidate.version,
|
|
232
|
-
packageName: packageName.name,
|
|
233
|
-
}));
|
|
234
|
-
});
|
|
235
|
-
return updates;
|
|
236
|
-
}
|
|
237
|
-
supportsSnapshots() {
|
|
238
|
-
return true;
|
|
239
|
-
}
|
|
240
|
-
defaultInitialVersion() {
|
|
241
|
-
return '0.1.0';
|
|
242
|
-
}
|
|
243
|
-
async coerceVersions(cc, candidate, _latestTag, currentVersions) {
|
|
244
|
-
const newVersions = new Map();
|
|
245
|
-
for (const [k, version] of currentVersions) {
|
|
246
|
-
if (candidate.version === '1.0.0' && stability_1.isStableArtifact(k)) {
|
|
247
|
-
newVersions.set(k, '1.0.0');
|
|
248
|
-
}
|
|
249
|
-
else {
|
|
250
|
-
const bump = await cc.suggestBump(version);
|
|
251
|
-
const newVersion = version_1.Version.parse(version);
|
|
252
|
-
newVersion.bump(this.snapshot ? 'snapshot' : bump_type_1.fromSemverReleaseType(bump.releaseType));
|
|
253
|
-
newVersions.set(k, newVersion.toString());
|
|
254
|
-
}
|
|
255
|
-
}
|
|
256
|
-
return newVersions;
|
|
257
|
-
}
|
|
258
|
-
// Begin release configuration
|
|
259
|
-
// Override this method to use static branch names
|
|
260
|
-
// If you modify this, you must ensure that the releaser can parse the tag version
|
|
261
|
-
// from the pull request.
|
|
262
|
-
async buildBranchName(_version, includePackageName) {
|
|
263
|
-
const defaultBranch = await this.gh.getDefaultBranch();
|
|
264
|
-
const packageName = await this.getPackageName();
|
|
265
|
-
if (includePackageName && packageName.getComponent()) {
|
|
266
|
-
return branch_name_1.BranchName.ofComponentTargetBranch(packageName.getComponent(), defaultBranch);
|
|
267
|
-
}
|
|
268
|
-
return branch_name_1.BranchName.ofTargetBranch(defaultBranch);
|
|
269
|
-
}
|
|
270
|
-
// Override this method to modify the pull request title
|
|
271
|
-
async buildPullRequestTitle(version, includePackageName) {
|
|
272
|
-
const defaultBranch = await this.gh.getDefaultBranch();
|
|
273
|
-
const repoDefaultBranch = await this.gh.getRepositoryDefaultBranch();
|
|
274
|
-
// If we are proposing a release to a non-default branch, add the target
|
|
275
|
-
// branch in the pull request title.
|
|
276
|
-
// TODO: consider pushing this change up to the default pull request title
|
|
277
|
-
if (repoDefaultBranch === defaultBranch) {
|
|
278
|
-
return super.buildPullRequestTitle(version, includePackageName);
|
|
279
|
-
}
|
|
280
|
-
const packageName = await this.getPackageName();
|
|
281
|
-
const pullRequestTitle = includePackageName
|
|
282
|
-
? pull_request_title_1.PullRequestTitle.ofComponentTargetBranchVersion(packageName.name, defaultBranch, version)
|
|
283
|
-
: pull_request_title_1.PullRequestTitle.ofTargetBranchVersion(defaultBranch, version);
|
|
284
|
-
return pullRequestTitle.toString();
|
|
285
|
-
}
|
|
286
|
-
/**
|
|
287
|
-
* Normalize version parsing when searching for a latest release.
|
|
288
|
-
*
|
|
289
|
-
* @param version The raw version string
|
|
290
|
-
* @param preRelease Whether to allow pre-release versions or not
|
|
291
|
-
* @returns {string|null} The normalized version string or null if
|
|
292
|
-
* we want to disallow this version.
|
|
293
|
-
*/
|
|
294
|
-
normalizeVersion(version, preRelease = false) {
|
|
295
|
-
// Consider any version with a '-SNAPSHOT' as a pre-release version
|
|
296
|
-
if (!preRelease && version.endsWith('-SNAPSHOT')) {
|
|
297
|
-
logger_1.logger.info('preRelease not requested and found snapshot - ignoring...');
|
|
298
|
-
return null;
|
|
299
|
-
}
|
|
300
|
-
return version;
|
|
301
|
-
}
|
|
302
|
-
}
|
|
303
|
-
exports.JavaYoshi = JavaYoshi;
|
|
304
|
-
//# sourceMappingURL=java-yoshi.js.map
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { ReleaseCandidate, PackageName, ReleasePR } from '../release-pr';
|
|
2
|
-
import { Update } from '../updaters/update';
|
|
3
|
-
export declare class KRMBlueprint extends ReleasePR {
|
|
4
|
-
protected buildUpdates(changelogEntry: string, candidate: ReleaseCandidate, packageName: PackageName): Promise<Update[]>;
|
|
5
|
-
defaultInitialVersion(): string;
|
|
6
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { ReleasePR, ReleaseCandidate, PackageName } from '../release-pr';
|
|
2
|
-
import { Update } from '../updaters/update';
|
|
3
|
-
export declare class Node extends ReleasePR {
|
|
4
|
-
private pkgJsonContents?;
|
|
5
|
-
private _packageName?;
|
|
6
|
-
enableSimplePrereleaseParsing: boolean;
|
|
7
|
-
protected buildUpdates(changelogEntry: string, candidate: ReleaseCandidate, packageName: PackageName): Promise<Update[]>;
|
|
8
|
-
getPackageName(): Promise<PackageName>;
|
|
9
|
-
private getPkgJsonContents;
|
|
10
|
-
}
|
|
@@ -1,84 +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.Node = void 0;
|
|
17
|
-
const release_pr_1 = require("../release-pr");
|
|
18
|
-
// Generic
|
|
19
|
-
const changelog_1 = require("../updaters/changelog");
|
|
20
|
-
// JavaScript
|
|
21
|
-
const package_json_1 = require("../updaters/package-json");
|
|
22
|
-
const package_lock_json_1 = require("../updaters/package-lock-json");
|
|
23
|
-
const samples_package_json_1 = require("../updaters/samples-package-json");
|
|
24
|
-
class Node extends release_pr_1.ReleasePR {
|
|
25
|
-
constructor() {
|
|
26
|
-
super(...arguments);
|
|
27
|
-
this.enableSimplePrereleaseParsing = true;
|
|
28
|
-
}
|
|
29
|
-
async buildUpdates(changelogEntry, candidate, packageName) {
|
|
30
|
-
const updates = [];
|
|
31
|
-
const lockFiles = ['package-lock.json', 'npm-shrinkwrap.json'];
|
|
32
|
-
lockFiles.forEach(lockFile => {
|
|
33
|
-
updates.push(new package_lock_json_1.PackageLockJson({
|
|
34
|
-
path: this.addPath(lockFile),
|
|
35
|
-
changelogEntry,
|
|
36
|
-
version: candidate.version,
|
|
37
|
-
packageName: packageName.name,
|
|
38
|
-
}));
|
|
39
|
-
});
|
|
40
|
-
updates.push(new samples_package_json_1.SamplesPackageJson({
|
|
41
|
-
path: this.addPath('samples/package.json'),
|
|
42
|
-
changelogEntry,
|
|
43
|
-
version: candidate.version,
|
|
44
|
-
packageName: packageName.name,
|
|
45
|
-
}));
|
|
46
|
-
updates.push(new changelog_1.Changelog({
|
|
47
|
-
path: this.addPath(this.changelogPath),
|
|
48
|
-
changelogEntry,
|
|
49
|
-
version: candidate.version,
|
|
50
|
-
packageName: packageName.name,
|
|
51
|
-
}));
|
|
52
|
-
updates.push(new package_json_1.PackageJson({
|
|
53
|
-
path: this.addPath('package.json'),
|
|
54
|
-
changelogEntry,
|
|
55
|
-
version: candidate.version,
|
|
56
|
-
packageName: packageName.name,
|
|
57
|
-
contents: await this.getPkgJsonContents(),
|
|
58
|
-
}));
|
|
59
|
-
return updates;
|
|
60
|
-
}
|
|
61
|
-
// Always prefer the package.json name
|
|
62
|
-
async getPackageName() {
|
|
63
|
-
var _a;
|
|
64
|
-
if (this._packageName === undefined) {
|
|
65
|
-
const pkgJsonContents = await this.getPkgJsonContents();
|
|
66
|
-
const pkg = JSON.parse(pkgJsonContents.parsedContent);
|
|
67
|
-
this.packageName = this._packageName = (_a = pkg.name) !== null && _a !== void 0 ? _a : this.packageName;
|
|
68
|
-
}
|
|
69
|
-
return {
|
|
70
|
-
name: this.packageName,
|
|
71
|
-
getComponent: () => this.packageName.match(/^@[\w-]+\//)
|
|
72
|
-
? this.packageName.split('/')[1]
|
|
73
|
-
: this.packageName,
|
|
74
|
-
};
|
|
75
|
-
}
|
|
76
|
-
async getPkgJsonContents() {
|
|
77
|
-
if (!this.pkgJsonContents) {
|
|
78
|
-
this.pkgJsonContents = await this.gh.getFileContents(this.addPath('package.json'));
|
|
79
|
-
}
|
|
80
|
-
return this.pkgJsonContents;
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
exports.Node = Node;
|
|
84
|
-
//# sourceMappingURL=node.js.map
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { ReleasePR, ReleaseCandidate, PackageName } from '../release-pr';
|
|
2
|
-
import { Update } from '../updaters/update';
|
|
3
|
-
export declare class OCaml extends ReleasePR {
|
|
4
|
-
protected buildUpdates(changelogEntry: string, candidate: ReleaseCandidate, packageName: PackageName): Promise<Update[]>;
|
|
5
|
-
}
|
|
@@ -1,191 +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.PHPYoshi = void 0;
|
|
17
|
-
const release_pr_1 = require("../release-pr");
|
|
18
|
-
const conventional_commits_1 = require("../conventional-commits");
|
|
19
|
-
const commit_split_1 = require("../commit-split");
|
|
20
|
-
const semver = require("semver");
|
|
21
|
-
// Generic
|
|
22
|
-
const changelog_1 = require("../updaters/changelog");
|
|
23
|
-
// Yoshi PHP Monorepo
|
|
24
|
-
const php_client_version_1 = require("../updaters/php-client-version");
|
|
25
|
-
const php_manifest_1 = require("../updaters/php-manifest");
|
|
26
|
-
const version_1 = require("../updaters/version");
|
|
27
|
-
const logger_1 = require("../util/logger");
|
|
28
|
-
const root_composer_update_packages_1 = require("../updaters/root-composer-update-packages");
|
|
29
|
-
const CHANGELOG_SECTIONS = [
|
|
30
|
-
{ type: 'feat', section: 'Features' },
|
|
31
|
-
{ type: 'fix', section: 'Bug Fixes' },
|
|
32
|
-
{ type: 'perf', section: 'Performance Improvements' },
|
|
33
|
-
{ type: 'revert', section: 'Reverts' },
|
|
34
|
-
{ type: 'docs', section: 'Documentation' },
|
|
35
|
-
{ type: 'chore', section: 'Miscellaneous Chores' },
|
|
36
|
-
{ type: 'style', section: 'Styles', hidden: true },
|
|
37
|
-
{ type: 'refactor', section: 'Code Refactoring', hidden: true },
|
|
38
|
-
{ type: 'test', section: 'Tests', hidden: true },
|
|
39
|
-
{ type: 'build', section: 'Build System', hidden: true },
|
|
40
|
-
{ type: 'ci', section: 'Continuous Integration', hidden: true },
|
|
41
|
-
];
|
|
42
|
-
class PHPYoshi extends release_pr_1.ReleasePR {
|
|
43
|
-
async _run() {
|
|
44
|
-
const latestTag = await this.latestTag();
|
|
45
|
-
const commits = await this.commits({
|
|
46
|
-
sha: latestTag ? latestTag.sha : undefined,
|
|
47
|
-
});
|
|
48
|
-
// we create an instance of conventional CHANGELOG for bumping the
|
|
49
|
-
// top-level tag version we maintain on the mono-repo itself.
|
|
50
|
-
const ccb = new conventional_commits_1.ConventionalCommits({
|
|
51
|
-
commits,
|
|
52
|
-
owner: this.gh.owner,
|
|
53
|
-
repository: this.gh.repo,
|
|
54
|
-
bumpMinorPreMajor: true,
|
|
55
|
-
changelogSections: CHANGELOG_SECTIONS,
|
|
56
|
-
});
|
|
57
|
-
const candidate = await this.coerceReleaseCandidate(ccb, latestTag);
|
|
58
|
-
// partition a set of packages in the mono-repo that need to be
|
|
59
|
-
// updated since our last release -- the set of string keys
|
|
60
|
-
// is sorted to ensure consistency in the CHANGELOG.
|
|
61
|
-
const updates = [];
|
|
62
|
-
let changelogEntry = `## ${candidate.version}`;
|
|
63
|
-
const bulkUpdate = await this.releaseAllPHPLibraries(commits, updates, changelogEntry);
|
|
64
|
-
changelogEntry = bulkUpdate.changelogEntry;
|
|
65
|
-
const packageName = await this.getPackageName();
|
|
66
|
-
// update the aggregate package information in the root
|
|
67
|
-
// composer.json and manifest.json.
|
|
68
|
-
updates.push(new root_composer_update_packages_1.RootComposerUpdatePackages({
|
|
69
|
-
path: 'composer.json',
|
|
70
|
-
changelogEntry,
|
|
71
|
-
version: candidate.version,
|
|
72
|
-
versions: bulkUpdate.versionUpdates,
|
|
73
|
-
packageName: packageName.name,
|
|
74
|
-
}));
|
|
75
|
-
updates.push(new php_manifest_1.PHPManifest({
|
|
76
|
-
path: 'docs/manifest.json',
|
|
77
|
-
changelogEntry,
|
|
78
|
-
version: candidate.version,
|
|
79
|
-
versions: bulkUpdate.versionUpdates,
|
|
80
|
-
packageName: packageName.name,
|
|
81
|
-
}));
|
|
82
|
-
updates.push(new changelog_1.Changelog({
|
|
83
|
-
path: this.changelogPath,
|
|
84
|
-
changelogEntry,
|
|
85
|
-
version: candidate.version,
|
|
86
|
-
packageName: packageName.name,
|
|
87
|
-
}));
|
|
88
|
-
['src/Version.php', 'src/ServiceBuilder.php'].forEach((path) => {
|
|
89
|
-
updates.push(new php_client_version_1.PHPClientVersion({
|
|
90
|
-
path,
|
|
91
|
-
changelogEntry,
|
|
92
|
-
version: candidate.version,
|
|
93
|
-
packageName: packageName.name,
|
|
94
|
-
}));
|
|
95
|
-
});
|
|
96
|
-
return await this.openPR({
|
|
97
|
-
sha: commits[0].sha,
|
|
98
|
-
changelogEntry,
|
|
99
|
-
updates,
|
|
100
|
-
version: candidate.version,
|
|
101
|
-
includePackageName: this.monorepoTags,
|
|
102
|
-
});
|
|
103
|
-
}
|
|
104
|
-
async releaseAllPHPLibraries(commits, updates, changelogEntry) {
|
|
105
|
-
const cs = new commit_split_1.CommitSplit();
|
|
106
|
-
const commitLookup = cs.split(commits);
|
|
107
|
-
const pkgKeys = Object.keys(commitLookup).sort();
|
|
108
|
-
// map of library names that need to be updated in the top level
|
|
109
|
-
// composer.json and manifest.json.
|
|
110
|
-
const versionUpdates = new Map();
|
|
111
|
-
// walk each individual library updating the VERSION file, and
|
|
112
|
-
// if necessary the `const VERSION` in the client library.
|
|
113
|
-
for (let i = 0; i < pkgKeys.length; i++) {
|
|
114
|
-
const pkgKey = pkgKeys[i];
|
|
115
|
-
const cc = new conventional_commits_1.ConventionalCommits({
|
|
116
|
-
commits: commitLookup[pkgKey],
|
|
117
|
-
owner: this.gh.owner,
|
|
118
|
-
repository: this.gh.repo,
|
|
119
|
-
bumpMinorPreMajor: this.bumpMinorPreMajor,
|
|
120
|
-
changelogSections: CHANGELOG_SECTIONS,
|
|
121
|
-
});
|
|
122
|
-
// some packages in the mono-repo might have only had chores,
|
|
123
|
-
// build updates, etc., applied.
|
|
124
|
-
if (!this.changelogEmpty(await cc.generateChangelogEntry({ version: '0.0.0' }))) {
|
|
125
|
-
try {
|
|
126
|
-
const contents = await this.gh.getFileContents(`${pkgKey}/VERSION`);
|
|
127
|
-
const bump = await cc.suggestBump(contents.parsedContent);
|
|
128
|
-
const candidate = semver.inc(contents.parsedContent, bump.releaseType);
|
|
129
|
-
if (!candidate) {
|
|
130
|
-
logger_1.logger.error(`failed to update ${pkgKey} version`);
|
|
131
|
-
continue;
|
|
132
|
-
}
|
|
133
|
-
const meta = JSON.parse((await this.gh.getFileContents(`${pkgKey}/composer.json`))
|
|
134
|
-
.parsedContent);
|
|
135
|
-
versionUpdates.set(meta.name, candidate);
|
|
136
|
-
changelogEntry = updatePHPChangelogEntry(`${meta.name} ${candidate}`, changelogEntry, await cc.generateChangelogEntry({ version: candidate }));
|
|
137
|
-
const packageName = await this.getPackageName();
|
|
138
|
-
updates.push(new version_1.Version({
|
|
139
|
-
path: `${pkgKey}/VERSION`,
|
|
140
|
-
changelogEntry,
|
|
141
|
-
version: candidate,
|
|
142
|
-
packageName: packageName.name,
|
|
143
|
-
contents,
|
|
144
|
-
}));
|
|
145
|
-
// extra.component indicates an entry-point class file
|
|
146
|
-
// that must have its version # updatd.
|
|
147
|
-
if (meta.extra &&
|
|
148
|
-
meta.extra.component &&
|
|
149
|
-
meta.extra.component.entry) {
|
|
150
|
-
updates.push(new php_client_version_1.PHPClientVersion({
|
|
151
|
-
path: `${pkgKey}/${meta.extra.component.entry}`,
|
|
152
|
-
changelogEntry,
|
|
153
|
-
version: candidate,
|
|
154
|
-
packageName: packageName.name,
|
|
155
|
-
}));
|
|
156
|
-
}
|
|
157
|
-
}
|
|
158
|
-
catch (err) {
|
|
159
|
-
if (err.status === 404) {
|
|
160
|
-
// if the updated path has no VERSION, assume this isn't a
|
|
161
|
-
// module that needs updating.
|
|
162
|
-
continue;
|
|
163
|
-
}
|
|
164
|
-
else {
|
|
165
|
-
throw err;
|
|
166
|
-
}
|
|
167
|
-
}
|
|
168
|
-
}
|
|
169
|
-
}
|
|
170
|
-
return { changelogEntry, versionUpdates };
|
|
171
|
-
}
|
|
172
|
-
}
|
|
173
|
-
exports.PHPYoshi = PHPYoshi;
|
|
174
|
-
function updatePHPChangelogEntry(pkgKey, changelogEntry, entryUpdate) {
|
|
175
|
-
{
|
|
176
|
-
// Remove the first line of the entry, in favor of <summary>.
|
|
177
|
-
// This also allows us to use the same regex for extracting release
|
|
178
|
-
// notes (since the string "## v0.0.0" doesn't show up multiple times).
|
|
179
|
-
const entryUpdateSplit = entryUpdate.split(/\r?\n/);
|
|
180
|
-
entryUpdateSplit.shift();
|
|
181
|
-
entryUpdate = entryUpdateSplit.join('\n');
|
|
182
|
-
}
|
|
183
|
-
return `${changelogEntry}
|
|
184
|
-
|
|
185
|
-
<details><summary>${pkgKey}</summary>
|
|
186
|
-
|
|
187
|
-
${entryUpdate}
|
|
188
|
-
|
|
189
|
-
</details>`;
|
|
190
|
-
}
|
|
191
|
-
//# sourceMappingURL=php-yoshi.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { ReleasePR, ReleaseCandidate, PackageName } from '../release-pr';
|
|
2
|
-
import { Update } from '../updaters/update';
|
|
3
|
-
import { ReleasePRConstructorOptions } from '..';
|
|
4
|
-
export declare class PHP extends ReleasePR {
|
|
5
|
-
constructor(options: ReleasePRConstructorOptions);
|
|
6
|
-
protected buildUpdates(changelogEntry: string, candidate: ReleaseCandidate, packageName: PackageName): Promise<Update[]>;
|
|
7
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { ReleasePR, ReleaseCandidate, PackageName } from '../release-pr';
|
|
2
|
-
import { Update } from '../updaters/update';
|
|
3
|
-
import { ReleasePRConstructorOptions } from '..';
|
|
4
|
-
import { PyProject } from '../updaters/python/pyproject-toml';
|
|
5
|
-
export declare class Python extends ReleasePR {
|
|
6
|
-
enableSimplePrereleaseParsing: boolean;
|
|
7
|
-
constructor(options: ReleasePRConstructorOptions);
|
|
8
|
-
protected buildUpdates(changelogEntry: string, candidate: ReleaseCandidate, packageName: PackageName): Promise<Update[]>;
|
|
9
|
-
protected getPyProject(): Promise<PyProject | null>;
|
|
10
|
-
defaultInitialVersion(): string;
|
|
11
|
-
}
|