From ad337b8b06fff616da9c0d18443a5c61f387f33a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Grzegorz=20=28Greg=29=20Zi=C3=B3=C5=82kowski?= Date: Thu, 5 Dec 2019 12:22:14 +0100 Subject: [PATCH] Repository management: Add option to perform the legacy patch release (#18938) --- package.json | 3 ++- packages/README.md | 10 ++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index e35757b29f229..1a35f14a1faa4 100644 --- a/package.json +++ b/package.json @@ -188,7 +188,8 @@ "package-plugin": "./bin/build-plugin-zip.sh", "pot-to-php": "./bin/pot-to-php.js", "publish:check": "npm run build:packages && lerna updated", - "publish:dev": "npm run build:packages && lerna publish --npm-tag next", + "publish:dev": "npm run build:packages && lerna publish --dist-tag next", + "publish:legacy": "npm run build:packages && lerna publish --dist-tag legacy", "publish:prod": "npm run build:packages && lerna publish", "test": "npm run lint && npm run test-unit", "test-e2e": "wp-scripts test-e2e --config packages/e2e-tests/jest.config.js", diff --git a/packages/README.md b/packages/README.md index 3937b7adee5a3..b0f7d8562cdb3 100644 --- a/packages/README.md +++ b/packages/README.md @@ -180,5 +180,15 @@ npm run publish:prod Choose the correct version based on `CHANGELOG.md` files, confirm your choices and let Lerna do its magic. +### Legacy Patch Release + +To release a patch for the older major or minor version of packages, run the following command: + +```bash +npm run publish:legacy +``` + +This is usually necessary when adding bug fixes or security patches to the earlier versions of WordPress. + [lerna]: https://lerna.js.org/ [npm]: https://www.npmjs.com/