-
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.
Merge tag 'rnmobile/1.21.0' into rnmobile/releases-2020
- Loading branch information
Showing
571 changed files
with
18,827 additions
and
8,719 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
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 |
---|---|---|
|
@@ -32,6 +32,7 @@ const packages = [ | |
'shortcode', | ||
'url', | ||
'viewport', | ||
'warning', | ||
'wordcount', | ||
]; | ||
|
||
|
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
Large diffs are not rendered by default.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,67 @@ | ||
|
||
# How to setup local WordPress environment on Ubuntu | ||
|
||
This article covers setting up the local WordPress development environment using Docker on Ubuntu. The docker binaries included in the Ubuntu repositories (19.10 and earlier) do not support the features needed for the WordPress environment. | ||
|
||
If you are using Ubuntu 19.04 or 18.04, you can follow these [directions from Docker to install](https://docs.docker.com/install/linux/docker-ce/ubuntu/). | ||
|
||
If you are using Ubuntu 19.10, Docker does not have a repository setup for this version. However, the binaries are the same as previous, so you can download the packages from: https://download.docker.com/linux/ubuntu/dists/disco/pool/stable/amd64/ | ||
|
||
Packages required: | ||
|
||
* `containerd.io_1.2.10-3_amd64.deb` | ||
* `docker-ce-cli_19.03.3~3-0~ubuntu-disco_amd64.deb` | ||
* `docker-ce_19.03.3~3-0~ubuntu-disco_amd64.deb` | ||
|
||
Install using: `sudo dpkg -i *.deb` | ||
|
||
Additionally, you need to install `docker-compose`, you can follow the [directions from Docker](https://docs.docker.com/compose/install/) or simply [download the latest binary](https://github.com/docker/compose/releases) from GitHub releases. | ||
|
||
After downloading the binary file `docker-compose-Linux-x86_64`, rename to just `docker-compose` and copy it to `/usr/local/bin` or another spot in your PATH. | ||
|
||
|
||
## Troubleshooting | ||
|
||
If you run into this error, when running `npm run env install` from the Gutenberg directory: | ||
|
||
``` | ||
ERROR: Couldn't connect to Docker daemon at http+docker://localhost - is it running? | ||
If it's at a non-standard location, specify the URL with the DOCKER_HOST environment variable. | ||
``` | ||
|
||
First, make sure docker is running. You can check using `ps -ef | grep docker` which should show something like: | ||
|
||
``` | ||
/usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock | ||
``` | ||
|
||
If docker is not running, try to start the service using: | ||
|
||
``` | ||
sudo systemctl start docker.service | ||
``` | ||
|
||
If docker is running, then it is not listening how the WordPress environment is trying to communicate. Try adding the following service override file to include listening on tcp. See docker documentation, [How do I enable the remote API for dockerd](https://success.docker.com/article/how-do-i-enable-the-remote-api-for-dockerd) | ||
|
||
``` | ||
# /etc/systemd/system/docker.service.d/override.conf | ||
[Service] | ||
ExecStart= | ||
ExecStart=/usr/bin/dockerd -H fd:// -H tcp://0.0.0.0:2376 | ||
``` | ||
|
||
Restart the service from the command-line | ||
``` | ||
sudo systemctl daemon-reload | ||
sudo systemctl restart docker.service | ||
``` | ||
|
||
After restarting the services, set the environment variable DOCKER_HOST and try starting using: | ||
|
||
``` | ||
DOCKER_HOST=http://127.0.0.1:2376 npm run env start | ||
``` | ||
|
||
Your environment should be setup at: http://localhost:8889/ | ||
|
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 |
---|---|---|
|
@@ -253,6 +253,128 @@ 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 | ||
|
||
The following workflow is needed when packages require bug fixes or security releases to be published to _npm_ outside of a WordPress release cycle. | ||
|
||
Note: Both the `master` and `wp/trunk` branches are restricted and can only be _pushed_ to by the Gutenberg Core team. | ||
|
||
Identify the commit hashes from the pull requests that need to be ported from the repo `master` branch to `wp/trunk` | ||
|
||
The `wp/trunk` branch now needs to be prepared to release and publish the packages to _npm_. | ||
|
||
Open a terminal and perform the following steps: | ||
1. `git checkout master` | ||
2. `git pull` | ||
3. `git checkout wp/trunk` | ||
4. `git pull` | ||
|
||
Before porting commits check that the `wp/trunk` branch does not have any outstanding packages waiting to be published: | ||
1. `git checkout wp/trunk` | ||
2. `npm run publish:check` | ||
|
||
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` | ||
|
||
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` | ||
2. `npm run publish:check` | ||
> Example | ||
> ```shell | ||
> npm run publish:check | ||
> @wordpress/e2e-tests | ||
> @wordpress/jest-preset-default | ||
> @wordpress/scripts | ||
> lerna success found 3 packages ready to publish | ||
> ``` | ||
Check the versions listed in the current `CHANGELOG.md` file, looking through the commit history of a package e.g [@wordpress/scripts](https://github.com/WordPress/gutenberg/commits/master/packages/scripts) and look out for _"chore(release): publish"_ and _"Update changelogs"_ commits to determine recent version bumps, then looking at the commits since the most recent release should aid with discovering what changes have occurred since the last release. | ||
Note: You may discover the current version of each package is not up to date, if so updating the previous released versions would be appreciated. | ||
Begin updating the _changelogs_ based on the [Maintaining Changelogs](https://github.com/WordPress/gutenberg/blob/master/packages/README.md#maintaining-changelogs) documentation and commit the changes: | ||
1. `git checkout wp/trunk` | ||
2. Update each of the `CHANGELOG.md` files | ||
3. Stage the _changelog_ changes `git add packages/` | ||
4. `git commit -m "Update changelogs"` | ||
5. Make a note of the commit hash of this commit | ||
> Example | ||
> ``` | ||
> [master 278f524f16] Update changelogs` 278f524 | ||
> ``` | ||
6. `git push` | ||
Now that the changes have been committed to the `wp/trunk` branch and the Travis CI builds for the `wp/trunk` [branch are passing](https://travis-ci.com/WordPress/gutenberg/branches) it's time to publish the packages to npm: | ||
1. Once again run `npm run publish:check` to confirm there are no unexpected packages ready to be published: | ||
> Example | ||
> ```shell | ||
> npm run publish:check | ||
> @wordpress/e2e-tests | ||
> @wordpress/jest-preset-default | ||
> @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. | ||
> 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... | ||
> lerna info publish Publishing packages to npm... | ||
> lerna info Verifying npm credentials | ||
> lerna info Checking two-factor auth mode | ||
> ? Enter OTP: 753566 | ||
> lerna success published @wordpress/jest-preset-default 5.3.1 | ||
> lerna success published @wordpress/scripts 6.1.1 | ||
> lerna success published @wordpress/e2e-tests 1.9.1 | ||
> Successfully published: | ||
> - @wordpress/[email protected] | ||
> - @wordpress/[email protected] | ||
> - @wordpress/[email protected] | ||
> lerna success published 3 packages | ||
> ``` | ||
Now that the packages have been published the _"chore(release): publish"_ and _"Update changelogs"_ commits to `wp/trunk` need to be ported to the `master` branch: | ||
1. `git checkout master` | ||
2. `git pull` | ||
3. Cherry-pick the `278f524`hash you noted above from the _"Update changelogs"_ commit made to `wp/trunk` | ||
4. `git cherry-pick 278f524` | ||
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` | ||
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 | ||
> ``` | ||
> 📣 Successfully published: | ||
> • @wordpress/[email protected] | ||
> • @wordpress/[email protected] | ||
> • @wordpress/[email protected] | ||
> Lerna success published 3 packages | ||
``` | ||
--------- | ||
Ta-da! 🎉 | ||
|
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
Oops, something went wrong.