-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Project management: Add step that updates CHANGELOG files before npm …
…releases
- Loading branch information
Showing
2 changed files
with
125 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -209,7 +209,7 @@ The Gutenberg repository mirrors the [WordPress SVN repository](https://make.wor | |
|
||
### Synchronizing WordPress Trunk | ||
|
||
For each Gutenberg plugin release, WordPress trunk should be synchronized with this release. This involves the following steps: | ||
For each Gutenberg plugin release, WordPress trunk should be synchronized with this release. This involves the following steps that are automated with `./bin/commander npm-stable` command: | ||
|
||
**Note:** The WordPress `trunk` branch can be closed or in "feature-freeze" mode. Usually, this happens between the first `beta` and the first `RC` of the WordPress release cycle. During this period, the Gutenberg plugin releases should not be synchronized with WordPress Core. | ||
|
||
|
@@ -219,12 +219,13 @@ For each Gutenberg plugin release, WordPress trunk should be synchronized with t | |
3. Remove all files from the current branch: `git rm -r .`. | ||
4. Check out all the files from the release branch: `git checkout release/x.x -- .`. | ||
5. Commit all changes to the `wp/trunk` branch with `git commit -m "Merge changes published in the Gutenberg plugin vX.X release"` and push to the repository. | ||
6. Update the `CHANGELOG.md` files of the packages with the new publish version calculated and commit to the `wp/trunk` branch. | ||
Aassuming the package versions are written using this format `major.minor.patch`, make sure to bump at least the `minor` version number. For example, if the CHANGELOG of the package to be released indicates that the next unreleased version is `5.6.1`, choose `5.7.0` as a version in case of `minor` version. | ||
|
||
Now, the branch is ready to be used to publish the npm packages. | ||
|
||
1. Run the [package release process] but when asked for the version numbers to choose for each package, (assuming the package versions are written using this format `major.minor.patch`) make sure to bump at least the `minor` version number. For example, if the CHANGELOG of the package to be released indicates that the next unreleased version is `5.6.1`, choose `5.7.0` as a version. | ||
2. Update the `CHANGELOG.md` files of the published packages with the new released versions and commit to the `wp/trunk` branch. | ||
3. Cherry-pick the "Publish" (created by Lerna) and the CHANGELOG update commits into the `master` branch of Gutenberg. | ||
1. Run the [package release process] but when asked for the version numbers to choose for each package pick values based on the updated CHANGELOG files. | ||
2. Cherry-pick the "Publish" (created by Lerna) and the CHANGELOG update commits into the `master` branch of Gutenberg. | ||
|
||
Now, the npm packages should be ready and a patch can be created and committed into WordPress `trunk`. | ||
|
||
|
@@ -254,7 +255,7 @@ Now, the branch is ready to be used to publish the npm packages. | |
Now, the npm packages should be ready and a patch can be created and committed into the corresponding WordPress SVN branch. | ||
|
||
|
||
### Standalone Package Releases | ||
### Standalone Package Releases | ||
|
||
The following workflow is needed when packages require bug fixes or security releases to be published to _npm_ outside of a WordPress release cycle. | ||
|
||
|
@@ -276,7 +277,7 @@ Before porting commits check that the `wp/trunk` branch does not have any outsta | |
|
||
Now _cherry-pick_ the commits from `master` to `wp/trunk`, use `-m 1 commithash` if the commit was a pull request merge commit: | ||
1. `git cherry-pick -m 1 cb150a2` | ||
2. `git push` | ||
2. `git push` | ||
|
||
Whilst waiting for the Travis CI build for `wp/trunk` [branch to pass](https://travis-ci.com/WordPress/gutenberg/branches) identify and begin updating the `CHANGELOG.md` files: | ||
1. `git checkout wp/trunk` | ||
|
@@ -317,23 +318,23 @@ Now that the changes have been committed to the `wp/trunk` branch and the Travis | |
> @wordpress/scripts | ||
> lerna success found 3 packages ready to publish | ||
> ``` | ||
2. Run the [package release process](https://github.com/WordPress/gutenberg/blob/master/packages/README.md#releasing-packages) but when asked for the version numbers to choose for each package use the versions you made note of above when updating each packages `CHANGELOG.md` file. | ||
2. Run the [package release process] but when asked for the version numbers to choose for each package use the versions you made note of above when updating each packages `CHANGELOG.md` file. | ||
> Truncated example of publishing process output | ||
> ``` | ||
> npm run publish:prod | ||
> | ||
> | ||
> Build Progress: [==============================] 100% | ||
> lerna notice cli v3.18.2 | ||
> lerna info versioning independent | ||
> ? Select a new version for @wordpress/e2e-tests (currently 1.9.0) Patch (1.9.1) | ||
> ? Select a new version for @wordpress/jest-preset-default (currently 5.3.0) Patch (5.3.1) | ||
> ? Select a new version for @wordpress/scripts (currently 6.1.0) Patch (6.1.1) | ||
> | ||
> | ||
> Changes: | ||
> - @wordpress/e2e-tests: 1.9.0 => 1.9.1 | ||
> - @wordpress/jest-preset-default: 5.3.0 => 5.3.1 | ||
> - @wordpress/scripts: 6.1.0 => 6.1.1 | ||
> | ||
> | ||
> ? Are you sure you want to publish these packages? Yes | ||
> lerna info execute Skipping releases | ||
> lerna info git Pushing tags... | ||
|
@@ -359,21 +360,21 @@ Now that the packages have been published the _"chore(release): publish"_ and _" | |
5. Get the commit hash from the the lerna publish commit either from the terminal or [wp/trunk commits](https://github.com/WordPress/gutenberg/commits/wp/trunk) | ||
6. Cherry-pick the `fe6ae0d` "chore(release): publish"_ commit made to `wp/trunk` | ||
7. `git cherry-pick fe6ae0d` | ||
8. `git push` | ||
8. `git push` | ||
Confirm the packages dependancies do not contain `file://` links in the `dependencies` or `devdependencies` section of the packages released, e.g: | ||
> https://unpkg.com/browse/@wordpress/[email protected]/package.json | ||
> https://unpkg.com/browse/@wordpress/[email protected]/package.json | ||
> https://unpkg.com/browse/@wordpress/[email protected]/package.json | ||
Time to announce the published changes in the #core-js and #core-editor Slack channels | ||
Time to announce the published changes in the #core-js and #core-editor Slack channels | ||
> ``` | ||
> 📣 Successfully published: | ||
> • @wordpress/[email protected] | ||
> • @wordpress/[email protected] | ||
> • @wordpress/[email protected] | ||
> Lerna success published 3 packages | ||
``` | ||
> ``` | ||
--------- | ||
|