Skip to content

Commit e2128ca

Browse files
authored
Merge pull request #91 from wp-cli/regenerate-readme
Regenerate README file
2 parents 503183b + 4695b31 commit e2128ca

1 file changed

Lines changed: 94 additions & 1 deletion

File tree

‎README.md‎

Lines changed: 94 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@ Running `composer install` or `composer update` also fetches every clone and fas
4949

5050
The `wp maintenance` commands don't need the full environment: any `wp` executable picks them up through `wp-cli.yml` when run from this folder. They authenticate with the GitHub CLI when it is logged in, and with the `GH_TOKEN` or `GITHUB_TOKEN` environment variable otherwise. Run `wp maintenance doctor` to check the setup.
5151

52+
To find out which packages have unreleased changes, run `wp maintenance release plan --bundle`. It makes no changes, and for each package it says whether a milestone is ready for `wp maintenance release generate` or what a maintainer still needs to decide, such as which milestone a merged pull request belongs to.
53+
5254
## Using
5355

5456
This package implements the following commands:
@@ -244,9 +246,26 @@ wp maintenance release close-released [<repo>...] [--bundle] [--all]
244246
Generate a new release out of an open milestone
245247

246248
~~~
247-
wp maintenance release generate [<repo>...] [--bundle] [--all]
249+
wp maintenance release generate [<repo>...] [--bundle] [--all] [--milestone=<milestone>] [--notes-file=<file>] [--yes]
248250
~~~
249251

252+
Tags the default branch with the version of the milestone, publishes a
253+
release whose notes list the pull requests merged for that milestone,
254+
and closes the milestone.
255+
256+
A milestone is skipped, with a warning, when it still has open issues or
257+
pull requests, has no merged pull requests, is not a version newer than
258+
the latest tag, or was already tagged. When a repository has several
259+
milestones that could be released, it is skipped unless --milestone says
260+
which one, as they would all tag the same commit.
261+
262+
It is also skipped unless `wp maintenance release plan` reports it as
263+
ready for that milestone: the tag ships everything merged into the
264+
default branch since the latest tag, so all of it has to belong to the
265+
milestone, and all of the milestone's pull requests have to be in it.
266+
267+
Run `wp maintenance release plan` first to see what is ready.
268+
250269
**OPTIONS**
251270

252271
[<repo>...]
@@ -259,6 +278,80 @@ wp maintenance release generate [<repo>...] [--bundle] [--all]
259278
[--all]
260279
Generate releases for all repositories in the wp-cli organization.
261280

281+
[--milestone=<milestone>]
282+
Only release the milestone with this title. Needs a single repository.
283+
284+
[--notes-file=<file>]
285+
Use the contents of this file as release notes, instead of the
286+
generated list of pull requests. Useful to publish notes that were
287+
reviewed and tidied up first. Needs --milestone.
288+
289+
[--yes]
290+
Publish without asking for confirmation.
291+
292+
**EXAMPLES**
293+
294+
# Review the generated notes, then publish them after fixing a typo.
295+
$ wp maintenance release-notes cache-command 3.0.1 --source=pull-request > notes.md
296+
$ wp maintenance release generate cache-command --milestone=3.0.1 --notes-file=notes.md --yes
297+
298+
299+
300+
### wp maintenance release plan
301+
302+
Checks which repositories have unreleased changes, and whether their
303+
304+
~~~
305+
wp maintenance release plan [<repo>...] [--bundle] [--all] [--format=<format>]
306+
~~~
307+
308+
milestones are ready to release them.
309+
310+
Compares the default branch of each repository against its latest
311+
version tag and looks at the pull requests merged since. A repository is
312+
`up_to_date` when none of them calls for a release, `ready` when they
313+
all sit on one open milestone that `release generate` can release, and
314+
`needs_human` when a maintainer has to decide something first, such as
315+
which milestone a pull request belongs to. The blockers say what.
316+
317+
Routine pull requests by Dependabot or GitHub Actions only count when
318+
they are on a milestone.
319+
320+
Makes no changes.
321+
322+
**OPTIONS**
323+
324+
[<repo>...]
325+
Name(s) of the repository to check. If no user/org was provided,
326+
'wp-cli' org is assumed.
327+
328+
[--bundle]
329+
Check every package of the bundle.
330+
331+
[--all]
332+
Check all repositories in the wp-cli organization.
333+
334+
[--format=<format>]
335+
Render output in a specific format. Defaults to a table in a terminal
336+
and to JSON otherwise. The JSON lists the unreleased pull requests and
337+
the blockers of each repository as well.
338+
---
339+
options:
340+
- table
341+
- json
342+
---
343+
344+
**EXAMPLES**
345+
346+
$ wp maintenance release plan cache-command db-command eval-command
347+
+----------------------+-------------+------------+---------+------------+
348+
| repo | status | latest_tag | release | blockers |
349+
+----------------------+-------------+------------+---------+------------+
350+
| wp-cli/cache-command | ready | v3.0.0 | v3.0.1 | |
351+
| wp-cli/db-command | needs_human | v3.0.1 | | open_items |
352+
| wp-cli/eval-command | up_to_date | v3.0.1 | | |
353+
+----------------------+-------------+------------+---------+------------+
354+
262355

263356

264357
### wp maintenance release-date

0 commit comments

Comments
 (0)