From e89720b9eca48cb4681c26e849d91bf34096f79e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafael=20Corr=C3=AAa=20Gomes?= Date: Fri, 10 Sep 2021 17:45:45 -0400 Subject: [PATCH] README > Syntax fixes --- README.md | 49 ++++++++++++++++++++++++++++++++++++------------- 1 file changed, 36 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 2b48c367..3d082362 100644 --- a/README.md +++ b/README.md @@ -6,50 +6,62 @@ Welcome to the Quality Patches Tool! Quality Patches Tool is designed to distribute quality patches across Adobe Commerce and Magento OS users so that users can get the latest available patches, select the required, and apply them. -## Installation +## Installation **On-Prem Project** -```$ composer require magento/quality-patches``` + composer require magento/quality-patches **Cloud Project** The [MQP](https://github.com/magento/quality-patches) package is a dependency for the [ece-tools](https://github.com/magento/ece-tools/) package starting from v.2002.1.2 and is installed or updated when you [update the ece-tools package version](https://devdocs.magento.com/cloud/project/ece-tools-update.html). ## Usage - On-Prem Project + > Make sure to test all patches in a pre-production environment. For the changes to be reflected, refresh the cache in the [Admin under System > Tools > Cache Management](https://docs.magento.com/user-guide/system/cache-management.html?_ga=2.172766563.1151974537.1596126236-1202073513.1559691283) > -> Use ```$ ./vendor/bin/magento-patches``` script +> Use ```./vendor/bin/magento-patches``` script **Status command** Show information about available patches for current Magento version: -```$ ./vendor/bin/magento-patches status``` +``` +./vendor/bin/magento-patches status +``` **Apply command** Applies provided list of patches: -```$ ./vendor/bin/magento-patches apply MAGETWO-95591 MAGETWO-67097``` +``` +./vendor/bin/magento-patches apply MAGETWO-95591 MAGETWO-67097 +``` **Revert command** Reverts provided list of patches: -```$ ./vendor/bin/magento-patches revert MAGETWO-95591 MAGETWO-67097``` +``` +./vendor/bin/magento-patches revert MAGETWO-95591 MAGETWO-67097 +``` Reverts all patches: -```$ ./vendor/bin/magento-patches revert --all``` +``` +./vendor/bin/magento-patches revert --all +``` ## Usage - Cloud Project + > Make sure to test all patches in a pre-production environment. For Magento Cloud, new branches can be created with magento-cloud environment:branch > -> Use ```$ ./vendor/bin/ece-patches``` script +> Use ```./vendor/bin/ece-patches``` script ### Applying a patch + Add to .magento.env.yaml environment variable QUALITY_PATCHES with a list of patches to apply: + ``` stage: build: @@ -57,12 +69,15 @@ stage: - MCTEST-1002 - MCTEST-1003 ``` + Commit and push updated .magento.env.yaml file into the remote branch. Patches will be applied during deploy process. ### Apply patches manually in a local environment + You can apply patches manually in a local environment and test them before you deploy. To apply patches manually: + 1. Add to .magento.env.yaml environment variable QUALITY_PATCHES with a list of patches to apply 2. From the project root, apply the patches: `$ ./vendor/bin/ece-patches apply` @@ -70,34 +85,42 @@ To apply patches manually: - Cloud-required patches - Quality patches from .magento.env.yaml - Custom patches from the /m2-hotfixes directory. -3. Check with `./vendor/bin/ece-patches status` if the patch was applied -4. Clear the Magento cache `$ ./bin/magento cache:clean` +3. Check with `./vendor/bin/ece-patches status` if the patch was applied +4. Clear the Magento cache `./bin/magento cache:clean` Test the patches, make any necessary changes to custom patches. ### Revert patches in a local environment + You can revert patches in a local environment to clean instance: -```$ ./vendor/bin/ece-patches revert``` +``` +./vendor/bin/ece-patches revert +``` Patches will be reverted in the following order: + - Custom patches from the /m2-hotfixes directory. - Magento-quality patches - Cloud-required patches ## Status command information + **Status:** + - *Applied* - the patch is already applied -- *Not applied* - the patch is not applied +- *Not applied* - the patch is not applied - *N/A* - if the status of patch cannot be defined due to some conflicts **Type:** + - *Optional* - all patches from [Quality Patches Tool](https://github.com/magento/quality-patches) are optional for Cloud & On-Prem customers - *Required* - all patches from [Cloud Patches](https://github.com/magento/magento-cloud-patches) are required for Cloud and optional for On-Prem customers - *Deprecated* - patch is marked as deprecated (there is a recommendation to revert if it was applied) - *Custom* - customer specific patches from m2-hotfixes folder (Cloud only) **Details:** + - *Affected components* - show the list of affected components (magento-modules) - *Required patches* - shows the list of required patches (dependencies) -- *Recommended replacement* - patch, that is recommended for replacement of deprecated patch +- *Recommended replacement* - patch, that is recommended for replacement of deprecated patch