release-please 13.0.0-candidate.5 → 13.1.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 +73 -0
- package/README.md +33 -131
- package/build/src/bin/release-please.js +12 -1
- package/build/src/changelog-notes.d.ts +1 -0
- package/build/src/changelog-notes.js +24 -0
- package/build/src/commit.d.ts +1 -1
- package/build/src/commit.js +14 -1
- package/build/src/factory.js +2 -9
- package/build/src/github.d.ts +41 -7
- package/build/src/github.js +52 -14
- package/build/src/index.d.ts +5 -0
- package/build/src/index.js +27 -0
- package/build/src/manifest.js +77 -20
- package/build/src/plugins/cargo-workspace.js +2 -2
- package/build/src/plugins/merge.js +6 -21
- package/build/src/plugins/node-workspace.js +2 -2
- package/build/src/pull-request.d.ts +8 -8
- package/build/src/release-pull-request.d.ts +6 -6
- package/build/src/release.d.ts +1 -0
- package/build/src/strategies/base.d.ts +111 -0
- package/build/src/strategies/base.js +271 -0
- package/build/src/strategies/dart.d.ts +2 -2
- package/build/src/strategies/dart.js +2 -2
- package/build/src/strategies/elixir.d.ts +2 -2
- package/build/src/strategies/elixir.js +2 -2
- package/build/src/strategies/go-yoshi.d.ts +3 -3
- package/build/src/strategies/go-yoshi.js +2 -2
- package/build/src/strategies/go.d.ts +2 -2
- package/build/src/strategies/go.js +2 -2
- package/build/src/strategies/helm.d.ts +2 -2
- package/build/src/strategies/helm.js +2 -2
- package/build/src/strategies/java-yoshi.d.ts +3 -8
- package/build/src/strategies/java-yoshi.js +2 -3
- package/build/src/strategies/krm-blueprint.d.ts +2 -2
- package/build/src/strategies/krm-blueprint.js +3 -3
- package/build/src/strategies/node.d.ts +2 -2
- package/build/src/strategies/node.js +2 -2
- package/build/src/strategies/ocaml.d.ts +2 -2
- package/build/src/strategies/ocaml.js +2 -2
- package/build/src/strategies/php-yoshi.d.ts +3 -3
- package/build/src/strategies/php-yoshi.js +2 -2
- package/build/src/strategies/php.d.ts +3 -3
- package/build/src/strategies/php.js +2 -2
- package/build/src/strategies/python.d.ts +2 -2
- package/build/src/strategies/python.js +2 -2
- package/build/src/strategies/ruby-yoshi.d.ts +3 -3
- package/build/src/strategies/ruby-yoshi.js +7 -2
- package/build/src/strategies/ruby.d.ts +3 -3
- package/build/src/strategies/ruby.js +2 -2
- package/build/src/strategies/rust.d.ts +2 -2
- package/build/src/strategies/rust.js +2 -2
- package/build/src/strategies/simple.d.ts +2 -2
- package/build/src/strategies/simple.js +2 -2
- package/build/src/strategies/terraform-module.d.ts +2 -2
- package/build/src/strategies/terraform-module.js +2 -2
- package/build/src/strategy.d.ts +8 -73
- package/build/src/strategy.js +0 -233
- package/build/src/updaters/composite.d.ts +3 -2
- package/build/src/updaters/composite.js +24 -1
- package/build/src/updaters/generic.d.ts +32 -0
- package/build/src/updaters/generic.js +110 -0
- package/build/src/updaters/rust/cargo-toml.js +5 -1
- package/build/src/util/commit-split.js +3 -0
- package/build/src/util/pull-request-title.js +1 -0
- package/build/src/version.d.ts +28 -5
- package/build/src/version.js +26 -0
- package/build/src/versioning-strategies/always-bump-patch.d.ts +4 -0
- package/build/src/versioning-strategies/always-bump-patch.js +4 -0
- package/build/src/versioning-strategies/default.d.ts +31 -0
- package/build/src/versioning-strategies/default.js +31 -0
- package/build/src/versioning-strategies/dependency-manifest.d.ts +8 -0
- package/build/src/versioning-strategies/dependency-manifest.js +8 -0
- package/build/src/versioning-strategies/java-add-snapshot.d.ts +4 -0
- package/build/src/versioning-strategies/java-add-snapshot.js +6 -5
- package/build/src/versioning-strategies/java-snapshot.d.ts +4 -0
- package/build/src/versioning-strategies/java-snapshot.js +4 -1
- package/build/src/versioning-strategies/service-pack.d.ts +5 -0
- package/build/src/versioning-strategies/service-pack.js +10 -3
- package/build/src/versioning-strategy.d.ts +67 -5
- package/build/src/versioning-strategy.js +37 -10
- package/package.json +3 -3
- package/build/src/release-notes.d.ts +0 -29
- package/build/src/release-notes.js +0 -71
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,79 @@
|
|
|
4
4
|
|
|
5
5
|
[1]: https://www.npmjs.com/package/release-please?activeTab=versions
|
|
6
6
|
|
|
7
|
+
## [13.1.0](https://www.github.com/googleapis/release-please/compare/v13.0.2...v13.1.0) (2021-12-29)
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
### Features
|
|
11
|
+
|
|
12
|
+
* introduce generic updater ([#1157](https://www.github.com/googleapis/release-please/issues/1157)) ([c97598c](https://www.github.com/googleapis/release-please/commit/c97598c137b5018c76f5d62137e277b991f4bfa3)), closes [#435](https://www.github.com/googleapis/release-please/issues/435) [#305](https://www.github.com/googleapis/release-please/issues/305) [#1139](https://www.github.com/googleapis/release-please/issues/1139) [#1174](https://www.github.com/googleapis/release-please/issues/1174)
|
|
13
|
+
|
|
14
|
+
### [13.0.2](https://www.github.com/googleapis/release-please/compare/v13.0.1...v13.0.2) (2021-12-29)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Bug Fixes
|
|
18
|
+
|
|
19
|
+
* set the title when creating a release ([#1177](https://www.github.com/googleapis/release-please/issues/1177)) ([d05001f](https://www.github.com/googleapis/release-please/commit/d05001faedcdf11869cd9db06e3a8a8071af4470))
|
|
20
|
+
|
|
21
|
+
### [13.0.1](https://www.github.com/googleapis/release-please/compare/v13.0.0...v13.0.1) (2021-12-23)
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
### Bug Fixes
|
|
25
|
+
|
|
26
|
+
* export public interface types from index.ts ([#1169](https://www.github.com/googleapis/release-please/issues/1169)) ([cef6407](https://www.github.com/googleapis/release-please/commit/cef6407b05b8bbbc17d0c0b9d4704dc1de80ccf0))
|
|
27
|
+
|
|
28
|
+
## [13.0.0](https://www.github.com/googleapis/release-please/compare/v12.6.0...v13.0.0) (2021-12-22)
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
### ⚠ BREAKING CHANGES
|
|
32
|
+
|
|
33
|
+
* releasers are now "strategies", more logic moved into base classes
|
|
34
|
+
* Node 12 is now required
|
|
35
|
+
* manifest is now main entrypoint for release please, and logic is shared between mono-repo/split-repo flow
|
|
36
|
+
* versioning straregy now handled by VersionStrategies rather than regexes
|
|
37
|
+
* merge Manifest and standard PR paths (#1104)
|
|
38
|
+
|
|
39
|
+
### Features
|
|
40
|
+
|
|
41
|
+
* add `includeComponentInTag` option for strategies and hook up to `--monorepo-tags` ([#1119](https://www.github.com/googleapis/release-please/issues/1119)) ([bf9aacd](https://www.github.com/googleapis/release-please/commit/bf9aacdde3a97c453f6e3280035607c97c7dffcd))
|
|
42
|
+
* add ability to override merged commit message ([#1161](https://www.github.com/googleapis/release-please/issues/1161)) ([c568b57](https://www.github.com/googleapis/release-please/commit/c568b57280f2048f6dabbb716cdb4174c3386b91)), closes [#967](https://www.github.com/googleapis/release-please/issues/967)
|
|
43
|
+
* add GitHub changelog notes generator ([#1120](https://www.github.com/googleapis/release-please/issues/1120)) ([1470661](https://www.github.com/googleapis/release-please/commit/1470661bd76a1e731585ed3fbf7363224c7a7a3e))
|
|
44
|
+
* enable specifying changelog section headings in the CLI ([#1162](https://www.github.com/googleapis/release-please/issues/1162)) ([aaa8342](https://www.github.com/googleapis/release-please/commit/aaa8342cd48062c56fe87b3296904274b7fb9dbe)), closes [#511](https://www.github.com/googleapis/release-please/issues/511)
|
|
45
|
+
* **go:** add support for bumping a Go version file ([#1112](https://www.github.com/googleapis/release-please/issues/1112)) ([8f6e52b](https://www.github.com/googleapis/release-please/commit/8f6e52b27811e6838800c7152be74e13201eb9e1))
|
|
46
|
+
* reimplement custom pull request title ([#1122](https://www.github.com/googleapis/release-please/issues/1122)) ([2f3e84c](https://www.github.com/googleapis/release-please/commit/2f3e84c8c51f367cad8baae44c8d9f0727aa02a5))
|
|
47
|
+
* reimplement Java 1.0.0 special version bumping ([#1126](https://www.github.com/googleapis/release-please/issues/1126)) ([28bc76b](https://www.github.com/googleapis/release-please/commit/28bc76b35d9e1eff218a5be1b9b8cebb4b1e6f9d))
|
|
48
|
+
* return path along with created release ([#1114](https://www.github.com/googleapis/release-please/issues/1114)) ([81fc0f4](https://www.github.com/googleapis/release-please/commit/81fc0f49d75ec66ef1915be26330734abddd11d7))
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
### Bug Fixes
|
|
52
|
+
|
|
53
|
+
* add back version/major/minor/patch ([#1118](https://www.github.com/googleapis/release-please/issues/1118)) ([4b6ae50](https://www.github.com/googleapis/release-please/commit/4b6ae5049e39e6f5bca10b514256090ea76ef5bd))
|
|
54
|
+
* allow setting release-type at root of manifest config ([#1159](https://www.github.com/googleapis/release-please/issues/1159)) ([fc73b6d](https://www.github.com/googleapis/release-please/commit/fc73b6dd3f5f7ed449b9d304e53bada911e3190f))
|
|
55
|
+
* backfill commit files ([#1110](https://www.github.com/googleapis/release-please/issues/1110)) ([173ce70](https://www.github.com/googleapis/release-please/commit/173ce704c9413d7f0da820fdd2961166a5ff0b73))
|
|
56
|
+
* backfill latest release with version found in manifest ([#1131](https://www.github.com/googleapis/release-please/issues/1131)) ([94859a0](https://www.github.com/googleapis/release-please/commit/94859a0cfbc58724016daaefaca03f34a43e0473))
|
|
57
|
+
* **cli:** pass pull-request-title-pattern ([#1128](https://www.github.com/googleapis/release-please/issues/1128)) ([28d7727](https://www.github.com/googleapis/release-please/commit/28d7727bc827612b02a8fde58d13cd87f962a399))
|
|
58
|
+
* combined manifest PR should include labels ([#1137](https://www.github.com/googleapis/release-please/issues/1137)) ([d8bb7ca](https://www.github.com/googleapis/release-please/commit/d8bb7caddfa14aabd3bfa19008c10ed911638a66))
|
|
59
|
+
* fallback to look at releases when looking for latest release ([#1146](https://www.github.com/googleapis/release-please/issues/1146)) ([76ed1a7](https://www.github.com/googleapis/release-please/commit/76ed1a77e64f28b0af7d8125dce457b885f80e52))
|
|
60
|
+
* fallback to look at tags when looking for latest release ([#1160](https://www.github.com/googleapis/release-please/issues/1160)) ([e06c6ba](https://www.github.com/googleapis/release-please/commit/e06c6ba5c3ce29689275e495934d4a6785962d5b))
|
|
61
|
+
* GitHub#findFilesByExtension should treat prefix as a directory ([#1165](https://www.github.com/googleapis/release-please/issues/1165)) ([b48ec5b](https://www.github.com/googleapis/release-please/commit/b48ec5bc285233436d7cb1b367326a3c6dd555a9))
|
|
62
|
+
* **github:** correctly return maxResults releases ([#1134](https://www.github.com/googleapis/release-please/issues/1134)) ([25f6811](https://www.github.com/googleapis/release-please/commit/25f68113d0e0bfa5a181d616c11bfd5e573cfaf5))
|
|
63
|
+
* make PullRequest, ReleasePullRequest, Version fields readonly ([#1150](https://www.github.com/googleapis/release-please/issues/1150)) ([9659c1c](https://www.github.com/googleapis/release-please/commit/9659c1c868395394a40ff8f6caf9aaa7998fb8b8))
|
|
64
|
+
* Manifest.fromConfig can find latest release version without component ([#1123](https://www.github.com/googleapis/release-please/issues/1123)) ([0aeb67b](https://www.github.com/googleapis/release-please/commit/0aeb67b4c4a497b5570bdec10f5ab15e620b235d))
|
|
65
|
+
* merge manifest release PRs unless separatePullRequests is configured ([#1129](https://www.github.com/googleapis/release-please/issues/1129)) ([328009d](https://www.github.com/googleapis/release-please/commit/328009d10b4609441a6f8432fa0d2aa9df1f5ff0))
|
|
66
|
+
* only backfill files if requested ([#1151](https://www.github.com/googleapis/release-please/issues/1151)) ([ae007fe](https://www.github.com/googleapis/release-please/commit/ae007feb430e97f2995d6fd431f2825512651e3a))
|
|
67
|
+
* reimplement draft releases ([#1111](https://www.github.com/googleapis/release-please/issues/1111)) ([6f38b4a](https://www.github.com/googleapis/release-please/commit/6f38b4aa5a206b358468e623a020ef715257ddfe))
|
|
68
|
+
* **rust:** Don't update dev-dependencies lacking a version key ([#1095](https://www.github.com/googleapis/release-please/issues/1095)) ([#1152](https://www.github.com/googleapis/release-please/issues/1152)) ([56f37d9](https://www.github.com/googleapis/release-please/commit/56f37d997c75ec5bcc330b08b0e9e25c68329b7a)), closes [#1094](https://www.github.com/googleapis/release-please/issues/1094)
|
|
69
|
+
* switch branch delimiter to `--` ([#1127](https://www.github.com/googleapis/release-please/issues/1127)) ([26442f1](https://www.github.com/googleapis/release-please/commit/26442f14356c387c9117f5d660b532185c8084c4))
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
### Code Refactoring
|
|
73
|
+
|
|
74
|
+
* manifest is now main entrypoint for release please, and logic is shared between mono-repo/split-repo flow ([fd8f9fc](https://www.github.com/googleapis/release-please/commit/fd8f9fc82838f3a3a05470dfe4dab4d3b47c6fa1))
|
|
75
|
+
* merge Manifest and standard PR paths ([#1104](https://www.github.com/googleapis/release-please/issues/1104)) ([fd8f9fc](https://www.github.com/googleapis/release-please/commit/fd8f9fc82838f3a3a05470dfe4dab4d3b47c6fa1))
|
|
76
|
+
* Node 12 is now required ([fd8f9fc](https://www.github.com/googleapis/release-please/commit/fd8f9fc82838f3a3a05470dfe4dab4d3b47c6fa1))
|
|
77
|
+
* releasers are now "strategies", more logic moved into base classes ([fd8f9fc](https://www.github.com/googleapis/release-please/commit/fd8f9fc82838f3a3a05470dfe4dab4d3b47c6fa1))
|
|
78
|
+
* versioning straregy now handled by VersionStrategies rather than regexes ([fd8f9fc](https://www.github.com/googleapis/release-please/commit/fd8f9fc82838f3a3a05470dfe4dab4d3b47c6fa1))
|
|
79
|
+
|
|
7
80
|
## [12.6.0](https://www.github.com/googleapis/release-please/compare/v12.5.0...v12.6.0) (2021-10-11)
|
|
8
81
|
|
|
9
82
|
|
package/README.md
CHANGED
|
@@ -75,6 +75,8 @@ The above commit message will contain:
|
|
|
75
75
|
that it's a breaking change.
|
|
76
76
|
3. an entry for the feature **"update encode to support unicode"**.
|
|
77
77
|
|
|
78
|
+
> :warning: **Important:** The additional messages must be added to the bottom of the commit.
|
|
79
|
+
|
|
78
80
|
## How do I change the version number?
|
|
79
81
|
|
|
80
82
|
When a commit to the main branch has `Release-As: x.x.x`(case insensitive) in the **commit body**, Release Please will open a new pull request for the specified version.
|
|
@@ -89,31 +91,25 @@ chore: release 2.0.0
|
|
|
89
91
|
Release-As: 2.0.0
|
|
90
92
|
```
|
|
91
93
|
|
|
92
|
-
##
|
|
94
|
+
## Strategy (Language) types supported
|
|
93
95
|
|
|
94
96
|
Release Please automates releases for the following flavors of repositories:
|
|
95
97
|
|
|
96
98
|
| release type | description
|
|
97
99
|
|-------------------|---------------------------------------------------------|
|
|
98
|
-
|
|
|
99
|
-
|
|
|
100
|
-
|
|
|
101
|
-
|
|
|
102
|
-
|
|
|
103
|
-
|
|
|
104
|
-
|
|
|
105
|
-
|
|
|
106
|
-
|
|
|
107
|
-
|
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
To add a new release type, simply use the existing [releasers](https://github.com/googleapis/release-please/tree/main/src/releasers) and [updaters](https://github.com/googleapis/release-please/tree/main/src/updaters)
|
|
112
|
-
as a starting point.
|
|
113
|
-
|
|
114
|
-
**releasers** describe the files that should be updated for a release.
|
|
115
|
-
|
|
116
|
-
**updaters** describe how to update the version in these files.
|
|
100
|
+
| `dart` | A repository with a pubspec.yaml and a CHANGELOG.md |
|
|
101
|
+
| `elixir` | A repository with a mix.exs and a CHANGELOG.md |
|
|
102
|
+
| `go` | A repository with a CHANGELOG.md |
|
|
103
|
+
| `helm` | A repository with a Chart.yaml and a CHANGELOG.md |
|
|
104
|
+
| `krm-blueprint` | [A kpt package, with 1 or more KRM files and a CHANGELOG.md](https://github.com/GoogleCloudPlatform/blueprints/tree/main/catalog/project) |
|
|
105
|
+
| `node` | [A Node.js repository, with a package.json and CHANGELOG.md](https://github.com/yargs/yargs) |
|
|
106
|
+
| `ocaml` | [An OCaml repository, containing 1 or more opam or esy files and a CHANGELOG.md](https://github.com/grain-lang/binaryen.ml) |
|
|
107
|
+
| `php` | A repository with a composer.json and a CHANGELOG.md |
|
|
108
|
+
| `python` | [A Python repository, with a setup.py, setup.cfg, CHANGELOG.md](https://github.com/googleapis/python-storage) and optionally a pyproject.toml and a <project>/\_\_init\_\_.py |
|
|
109
|
+
| `ruby` | A repository with a version.rb and a CHANGELOG.md |
|
|
110
|
+
| `rust` | A Rust repository, with a Cargo.toml (either as a crate or workspace) and a CHANGELOG.md |
|
|
111
|
+
| `simple` | [A repository with a version.txt and a CHANGELOG.md](https://github.com/googleapis/gapic-generator) |
|
|
112
|
+
| `terraform-module` | [A terraform module, with a version in the README.md, and a CHANGELOG.md](https://github.com/terraform-google-modules/terraform-google-project-factory) |
|
|
117
113
|
|
|
118
114
|
## Setting up Release Please
|
|
119
115
|
|
|
@@ -121,128 +117,34 @@ There are a variety of ways you can deploy release-please:
|
|
|
121
117
|
|
|
122
118
|
### GitHub Action (recommended)
|
|
123
119
|
|
|
124
|
-
The easiest way to run release please is as a GitHub action
|
|
125
|
-
|
|
126
|
-
1. If you haven't already done so, create a `.github/workflows` folder in your
|
|
127
|
-
repository (_this is where your actions will live_).
|
|
128
|
-
2. Now create a `.github/workflows/release-please.yml` file with these contents:
|
|
129
|
-
|
|
130
|
-
```yaml
|
|
131
|
-
on:
|
|
132
|
-
push:
|
|
133
|
-
branches:
|
|
134
|
-
- main
|
|
135
|
-
name: release-please
|
|
136
|
-
jobs:
|
|
137
|
-
release-please:
|
|
138
|
-
runs-on: ubuntu-latest
|
|
139
|
-
steps:
|
|
140
|
-
- uses: GoogleCloudPlatform/release-please-action@v2
|
|
141
|
-
with:
|
|
142
|
-
token: ${{ secrets.GITHUB_TOKEN }}
|
|
143
|
-
release-type: node
|
|
144
|
-
package-name: release-please-action
|
|
145
|
-
```
|
|
146
|
-
|
|
147
|
-
3. Merge the above action into your repository and make sure new commits follow
|
|
148
|
-
the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/)
|
|
149
|
-
convention, [release-please](https://github.com/googleapis/release-please)
|
|
150
|
-
will start creating Release PRs for you.
|
|
151
|
-
|
|
152
|
-
#### Automating publication to npm
|
|
153
|
-
|
|
154
|
-
With a few additions, the Release Please action can be made to publish to
|
|
155
|
-
npm when a Release PR is merged:
|
|
156
|
-
|
|
157
|
-
```yaml
|
|
158
|
-
on:
|
|
159
|
-
push:
|
|
160
|
-
branches:
|
|
161
|
-
- main
|
|
162
|
-
name: release-please
|
|
163
|
-
jobs:
|
|
164
|
-
release-please:
|
|
165
|
-
runs-on: ubuntu-latest
|
|
166
|
-
steps:
|
|
167
|
-
- uses: GoogleCloudPlatform/release-please-action@v2
|
|
168
|
-
id: release
|
|
169
|
-
with:
|
|
170
|
-
token: ${{ secrets.GITHUB_TOKEN }}
|
|
171
|
-
release-type: node
|
|
172
|
-
package-name: test-release-please
|
|
173
|
-
# The logic below handles the npm publication:
|
|
174
|
-
- uses: actions/checkout@v2
|
|
175
|
-
# these if statements ensure that a publication only occurs when
|
|
176
|
-
# a new release is created:
|
|
177
|
-
if: ${{ steps.release.outputs.release_created }}
|
|
178
|
-
- uses: actions/setup-node@v1
|
|
179
|
-
with:
|
|
180
|
-
node-version: 12
|
|
181
|
-
registry-url: 'https://registry.npmjs.org'
|
|
182
|
-
if: ${{ steps.release.outputs.release_created }}
|
|
183
|
-
# if you are using Yarn, substitute the command below with `yarn install --frozen-lockfile`
|
|
184
|
-
- run: npm ci
|
|
185
|
-
if: ${{ steps.release.outputs.release_created }}
|
|
186
|
-
- run: npm publish
|
|
187
|
-
env:
|
|
188
|
-
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
|
|
189
|
-
if: ${{ steps.release.outputs.release_created }}
|
|
190
|
-
```
|
|
191
|
-
|
|
192
|
-
> So that you can keep 2FA enabled for npm publications, we recommend setting
|
|
193
|
-
`registry-url` to your own [Wombat Dressing Room](https://github.com/GoogleCloudPlatform/wombat-dressing-room) deployment.
|
|
120
|
+
The easiest way to run release please is as a GitHub action. Please see [google-github-actions/release-please-action](https://github.com/google-github-actions/release-please-action) for installation and configuration instructions.
|
|
194
121
|
|
|
195
122
|
### Running as CLI
|
|
196
123
|
|
|
197
|
-
|
|
124
|
+
Please see [Running release-please CLI](docs/cli.md) for all the configuration options.
|
|
198
125
|
|
|
199
|
-
|
|
200
|
-
npm i release-please -g
|
|
201
|
-
```
|
|
126
|
+
### Install the GitHub App
|
|
202
127
|
|
|
203
|
-
|
|
128
|
+
There is a probot application available, which allows you to deploy Release
|
|
129
|
+
Please as a GitHub App. Please see
|
|
130
|
+
[github.com/googleapis/repo-automation-bots](https://github.com/googleapis/repo-automation-bots/tree/main/packages/release-please)
|
|
131
|
+
for installation and configuration instructions.
|
|
204
132
|
|
|
205
|
-
|
|
206
|
-
release-please release-pr --package-name=@google-cloud/firestore" \
|
|
207
|
-
--repo-url=googleapis/nodejs-firestore \
|
|
208
|
-
--token=$GITHUB_TOKEN
|
|
209
|
-
```
|
|
133
|
+
## Bootstrapping your Repository
|
|
210
134
|
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
| `--repo-url` | is the URL of the repository on GitHub. |
|
|
215
|
-
| `--token` | a token with write access to `--repo-url`. |
|
|
216
|
-
| `--default-branch`| branch to open pull release PR against (detected by default). |
|
|
217
|
-
| `--path` | create a release from a path other than the repository's root |
|
|
218
|
-
| `--monorepo-tags` | add prefix to tags and branches, allowing multiple libraries to be released from the same repository. |
|
|
219
|
-
| `--pull-request-title-pattern` | add title pattern to make release PR, defaults to using `chore${scope}: release${component} ${version}`. |
|
|
220
|
-
| `--signoff` | Add [`Signed-off-by`](https://git-scm.com/docs/git-commit#Documentation/git-commit.txt---signoff) line at the end of the commit log message using the user and email provided. (format "Name \<email@example.com\>") |
|
|
221
|
-
| `--api-url` | URL to use when making API requests [default: "https://api.github.com"] |
|
|
222
|
-
| `--graphql-url` | URL to use when making GraphQL requests [default: "https://api.github.com"] |
|
|
223
|
-
|
|
224
|
-
### Creating a release on GitHub
|
|
225
|
-
|
|
226
|
-
```bash
|
|
227
|
-
release-please github-release --repo-url=googleapis/nodejs-firestore \
|
|
228
|
-
--token=$GITHUB_TOKEN
|
|
229
|
-
```
|
|
135
|
+
Release Please looks at commits since your last release tag. It may or may not be able to find
|
|
136
|
+
your previous releases. The easiest way to on-board your repository is to
|
|
137
|
+
[bootstrap a manifest config](/docs/cli.md#bootstrapping).
|
|
230
138
|
|
|
231
|
-
|
|
232
|
-
|-------------------|---------------------------------------------------------|
|
|
233
|
-
| `--package-name` | is the name of the package to publish to publish to an upstream registry such as npm. |
|
|
234
|
-
| `--repo-url` | is the URL of the repository on GitHub. |
|
|
235
|
-
| `--token` | a token with write access to `--repo-url`. |
|
|
236
|
-
| `--path` | create a release from a path other than the repository's root |
|
|
237
|
-
| `--api-url` | URL to use when making API requests [default: "https://api.github.com"] |
|
|
238
|
-
| `--graphql-url` | URL to use when making GraphQL requests [default: "https://api.github.com"] |
|
|
139
|
+
## Customizing Release Please
|
|
239
140
|
|
|
240
|
-
|
|
141
|
+
Release Please provides several configuration options to allow customizing
|
|
142
|
+
your release process. Please see [customizing.md](docs/customizing.md) for more details.
|
|
241
143
|
|
|
242
|
-
|
|
243
|
-
Please as a GitHub App:
|
|
144
|
+
## Supporting Monorepos via Manifest Configuration
|
|
244
145
|
|
|
245
|
-
|
|
146
|
+
Release Please also supports releasing multiple artifacts from the same repository.
|
|
147
|
+
See more at [manifest-releaser.md](docs/manifest-releaser.md).
|
|
246
148
|
|
|
247
149
|
## Supported Node.js Versions
|
|
248
150
|
|
|
@@ -19,6 +19,7 @@ const coerce_option_1 = require("../util/coerce-option");
|
|
|
19
19
|
const yargs = require("yargs");
|
|
20
20
|
const github_1 = require("../github");
|
|
21
21
|
const manifest_1 = require("../manifest");
|
|
22
|
+
const changelog_notes_1 = require("../changelog-notes");
|
|
22
23
|
const logger_1 = require("../util/logger");
|
|
23
24
|
const factory_1 = require("../factory");
|
|
24
25
|
const bootstrapper_1 = require("../bootstrapper");
|
|
@@ -157,6 +158,16 @@ function pullRequestStrategyOptions(yargs) {
|
|
|
157
158
|
.option('changelog-type', {
|
|
158
159
|
describe: 'type of changelog to build',
|
|
159
160
|
choices: factory_1.getChangelogTypes(),
|
|
161
|
+
})
|
|
162
|
+
.option('changelog-sections', {
|
|
163
|
+
describe: 'comma-separated list of scopes to include in the changelog',
|
|
164
|
+
type: 'string',
|
|
165
|
+
coerce: (arg) => {
|
|
166
|
+
if (arg) {
|
|
167
|
+
return changelog_notes_1.buildChangelogSections(arg.split(','));
|
|
168
|
+
}
|
|
169
|
+
return arg;
|
|
170
|
+
},
|
|
160
171
|
})
|
|
161
172
|
.option('last-package-version', {
|
|
162
173
|
describe: 'last version # that package was released as',
|
|
@@ -389,7 +400,7 @@ const bootstrapCommand = {
|
|
|
389
400
|
command: 'bootstrap',
|
|
390
401
|
describe: 'configure release manifest',
|
|
391
402
|
builder(yargs) {
|
|
392
|
-
return manifestOptions(releaseOptions(pullRequestStrategyOptions(gitHubOptions(yargs))))
|
|
403
|
+
return manifestConfigOptions(manifestOptions(releaseOptions(pullRequestStrategyOptions(gitHubOptions(yargs)))))
|
|
393
404
|
.option('initial-version', {
|
|
394
405
|
description: 'current version',
|
|
395
406
|
})
|
|
@@ -13,4 +13,28 @@
|
|
|
13
13
|
// See the License for the specific language governing permissions and
|
|
14
14
|
// limitations under the License.
|
|
15
15
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.buildChangelogSections = void 0;
|
|
17
|
+
const DEFAULT_HEADINGS = {
|
|
18
|
+
feat: 'Features',
|
|
19
|
+
fix: 'Bug Fixes',
|
|
20
|
+
perf: 'Performance Improvements',
|
|
21
|
+
deps: 'Dependencies',
|
|
22
|
+
revert: 'Reverts',
|
|
23
|
+
docs: 'Documentation',
|
|
24
|
+
style: 'Styles',
|
|
25
|
+
chore: 'Miscellaneous Chores',
|
|
26
|
+
refactor: 'Code Refactoring',
|
|
27
|
+
test: 'Tests',
|
|
28
|
+
build: 'Build System',
|
|
29
|
+
ci: 'Continuous Integration',
|
|
30
|
+
};
|
|
31
|
+
function buildChangelogSections(scopes) {
|
|
32
|
+
return scopes.map(scope => {
|
|
33
|
+
return {
|
|
34
|
+
type: scope,
|
|
35
|
+
section: DEFAULT_HEADINGS[scope] || scope,
|
|
36
|
+
};
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
exports.buildChangelogSections = buildChangelogSections;
|
|
16
40
|
//# sourceMappingURL=changelog-notes.js.map
|
package/build/src/commit.d.ts
CHANGED
package/build/src/commit.js
CHANGED
|
@@ -288,8 +288,9 @@ function parseCommits(message) {
|
|
|
288
288
|
function parseConventionalCommits(commits) {
|
|
289
289
|
const conventionalCommits = [];
|
|
290
290
|
for (const commit of commits) {
|
|
291
|
+
const commitMessage = preprocessCommitMessage(commit);
|
|
291
292
|
try {
|
|
292
|
-
for (const parsedCommit of parseCommits(
|
|
293
|
+
for (const parsedCommit of parseCommits(commitMessage)) {
|
|
293
294
|
const breaking = parsedCommit.notes.filter(note => note.title === 'BREAKING CHANGE')
|
|
294
295
|
.length > 0;
|
|
295
296
|
conventionalCommits.push({
|
|
@@ -313,4 +314,16 @@ function parseConventionalCommits(commits) {
|
|
|
313
314
|
return conventionalCommits;
|
|
314
315
|
}
|
|
315
316
|
exports.parseConventionalCommits = parseConventionalCommits;
|
|
317
|
+
function preprocessCommitMessage(commit) {
|
|
318
|
+
// look for 'BEGIN_COMMIT_OVERRIDE' section of pull request body
|
|
319
|
+
if (commit.pullRequest) {
|
|
320
|
+
const overrideMessage = (commit.pullRequest.body.split('BEGIN_COMMIT_OVERRIDE')[1] || '')
|
|
321
|
+
.split('END_COMMIT_OVERRIDE')[0]
|
|
322
|
+
.trim();
|
|
323
|
+
if (overrideMessage) {
|
|
324
|
+
return overrideMessage;
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
return commit.message;
|
|
328
|
+
}
|
|
316
329
|
//# sourceMappingURL=commit.js.map
|
package/build/src/factory.js
CHANGED
|
@@ -68,6 +68,7 @@ const allReleaseTypes = [
|
|
|
68
68
|
const releasers = {
|
|
69
69
|
go: options => new go_1.Go(options),
|
|
70
70
|
'go-yoshi': options => new go_yoshi_1.GoYoshi(options),
|
|
71
|
+
'java-yoshi': options => new java_yoshi_1.JavaYoshi(options),
|
|
71
72
|
'krm-blueprint': options => new krm_blueprint_1.KRMBlueprint(options),
|
|
72
73
|
node: options => new node_1.Node(options),
|
|
73
74
|
ocaml: options => new ocaml_1.OCaml(options),
|
|
@@ -122,6 +123,7 @@ async function buildStrategy(options) {
|
|
|
122
123
|
includeComponentInTag: options.includeComponentInTag,
|
|
123
124
|
changelogNotes,
|
|
124
125
|
pullRequestTitlePattern: options.pullRequestTitlePattern,
|
|
126
|
+
extraFiles: options.extraFiles,
|
|
125
127
|
};
|
|
126
128
|
switch (options.releaseType) {
|
|
127
129
|
case 'ruby': {
|
|
@@ -136,23 +138,15 @@ async function buildStrategy(options) {
|
|
|
136
138
|
versionFile: options.versionFile,
|
|
137
139
|
});
|
|
138
140
|
}
|
|
139
|
-
case 'java-yoshi': {
|
|
140
|
-
return new java_yoshi_1.JavaYoshi({
|
|
141
|
-
...strategyOptions,
|
|
142
|
-
extraFiles: options.extraFiles,
|
|
143
|
-
});
|
|
144
|
-
}
|
|
145
141
|
case 'java-backport': {
|
|
146
142
|
return new java_yoshi_1.JavaYoshi({
|
|
147
143
|
...strategyOptions,
|
|
148
|
-
extraFiles: options.extraFiles,
|
|
149
144
|
versioningStrategy: new always_bump_patch_1.AlwaysBumpPatch(),
|
|
150
145
|
});
|
|
151
146
|
}
|
|
152
147
|
case 'java-bom': {
|
|
153
148
|
return new java_yoshi_1.JavaYoshi({
|
|
154
149
|
...strategyOptions,
|
|
155
|
-
extraFiles: options.extraFiles,
|
|
156
150
|
versioningStrategy: new dependency_manifest_1.DependencyManifest({
|
|
157
151
|
bumpMinorPreMajor: options.bumpMinorPreMajor,
|
|
158
152
|
bumpPatchForMinorPreMajor: options.bumpPatchForMinorPreMajor,
|
|
@@ -162,7 +156,6 @@ async function buildStrategy(options) {
|
|
|
162
156
|
case 'java-lts': {
|
|
163
157
|
return new java_yoshi_1.JavaYoshi({
|
|
164
158
|
...strategyOptions,
|
|
165
|
-
extraFiles: options.extraFiles,
|
|
166
159
|
versioningStrategy: new service_pack_1.ServicePackVersioningStrategy(),
|
|
167
160
|
});
|
|
168
161
|
}
|
package/build/src/github.d.ts
CHANGED
|
@@ -36,6 +36,16 @@ export interface GitHubFileContents {
|
|
|
36
36
|
parsedContent: string;
|
|
37
37
|
}
|
|
38
38
|
declare type CommitFilter = (commit: Commit) => boolean;
|
|
39
|
+
interface CommitIteratorOptions {
|
|
40
|
+
maxResults?: number;
|
|
41
|
+
backfillFiles?: boolean;
|
|
42
|
+
}
|
|
43
|
+
interface ReleaseIteratorOptions {
|
|
44
|
+
maxResults?: number;
|
|
45
|
+
}
|
|
46
|
+
interface TagIteratorOptions {
|
|
47
|
+
maxResults?: number;
|
|
48
|
+
}
|
|
39
49
|
export interface GitHubRelease {
|
|
40
50
|
name?: string;
|
|
41
51
|
tagName: string;
|
|
@@ -44,6 +54,10 @@ export interface GitHubRelease {
|
|
|
44
54
|
url: string;
|
|
45
55
|
draft?: boolean;
|
|
46
56
|
}
|
|
57
|
+
export interface GitHubTag {
|
|
58
|
+
name: string;
|
|
59
|
+
sha: string;
|
|
60
|
+
}
|
|
47
61
|
export declare class GitHub {
|
|
48
62
|
readonly repository: Repository;
|
|
49
63
|
private octokit;
|
|
@@ -81,22 +95,28 @@ export declare class GitHub {
|
|
|
81
95
|
* @param {string} targetBranch Target branch of commit
|
|
82
96
|
* @param {CommitFilter} filter Callback function that returns whether a
|
|
83
97
|
* commit/pull request matches certain criteria
|
|
84
|
-
* @param {
|
|
98
|
+
* @param {CommitIteratorOptions} options Query options
|
|
99
|
+
* @param {number} options.maxResults Limit the number of results searched.
|
|
85
100
|
* Defaults to unlimited.
|
|
101
|
+
* @param {boolean} options.backfillFiles If set, use the REST API for
|
|
102
|
+
* fetching the list of touched files in this commit. Defaults to `false`.
|
|
86
103
|
* @returns {Commit[]} List of commits to current branch
|
|
87
104
|
* @throws {GitHubAPIError} on an API error
|
|
88
105
|
*/
|
|
89
|
-
commitsSince(targetBranch: string, filter: CommitFilter,
|
|
106
|
+
commitsSince(targetBranch: string, filter: CommitFilter, options?: CommitIteratorOptions): Promise<Commit[]>;
|
|
90
107
|
/**
|
|
91
108
|
* Iterate through commit history with a max number of results scanned.
|
|
92
109
|
*
|
|
93
110
|
* @param {string} targetBranch target branch of commit
|
|
94
|
-
* @param {
|
|
111
|
+
* @param {CommitIteratorOptions} options Query options
|
|
112
|
+
* @param {number} options.maxResults Limit the number of results searched.
|
|
95
113
|
* Defaults to unlimited.
|
|
114
|
+
* @param {boolean} options.backfillFiles If set, use the REST API for
|
|
115
|
+
* fetching the list of touched files in this commit. Defaults to `false`.
|
|
96
116
|
* @yields {Commit}
|
|
97
117
|
* @throws {GitHubAPIError} on an API error
|
|
98
118
|
*/
|
|
99
|
-
mergeCommitIterator(targetBranch: string,
|
|
119
|
+
mergeCommitIterator(targetBranch: string, options?: CommitIteratorOptions): AsyncGenerator<Commit, void, unknown>;
|
|
100
120
|
private mergeCommitsGraphQL;
|
|
101
121
|
/**
|
|
102
122
|
* Get the list of file paths modified in a given commit.
|
|
@@ -129,15 +149,29 @@ export declare class GitHub {
|
|
|
129
149
|
*/
|
|
130
150
|
private pullRequestsGraphQL;
|
|
131
151
|
/**
|
|
132
|
-
* Iterate through
|
|
152
|
+
* Iterate through releases with a max number of results scanned.
|
|
133
153
|
*
|
|
134
|
-
* @param {
|
|
154
|
+
* @param {ReleaseIteratorOptions} options Query options
|
|
155
|
+
* @param {number} options.maxResults Limit the number of results searched.
|
|
135
156
|
* Defaults to unlimited.
|
|
136
157
|
* @yields {GitHubRelease}
|
|
137
158
|
* @throws {GitHubAPIError} on an API error
|
|
138
159
|
*/
|
|
139
|
-
releaseIterator(
|
|
160
|
+
releaseIterator(options?: ReleaseIteratorOptions): AsyncGenerator<GitHubRelease, void, unknown>;
|
|
140
161
|
private releaseGraphQL;
|
|
162
|
+
/**
|
|
163
|
+
* Iterate through tags with a max number of results scanned.
|
|
164
|
+
*
|
|
165
|
+
* @param {TagIteratorOptions} options Query options
|
|
166
|
+
* @param {number} options.maxResults Limit the number of results searched.
|
|
167
|
+
* Defaults to unlimited.
|
|
168
|
+
* @yields {GitHubTag}
|
|
169
|
+
* @throws {GitHubAPIError} on an API error
|
|
170
|
+
*/
|
|
171
|
+
tagIterator(options?: TagIteratorOptions): AsyncGenerator<{
|
|
172
|
+
name: string;
|
|
173
|
+
sha: string;
|
|
174
|
+
}, void, unknown>;
|
|
141
175
|
/**
|
|
142
176
|
* Fetch the contents of a file from the configured branch
|
|
143
177
|
*
|