Skip to content

Commit

Permalink
Merge pull request #9 from gitressa/patch-1
Browse files Browse the repository at this point in the history
Adds instructions for patching contrib modules
  • Loading branch information
serundeputy authored Aug 11, 2020
2 parents 2825add + c6db1eb commit 9854e2f
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,27 @@ lando create-patch

This will output a patch file to `/app/web/ISSUE####-COMMENT#.patch`, which you can upload to the drupal.org issue.

#### Contrib Module

To create a patch for a contrib module, for example [Admin Toolbar](https://www.drupal.org/project/admin_toolbar), download it to the modules folder, following the instructions under [Version control](https://www.drupal.org/project/admin_toolbar/git-instructions):

```
cd web/modules
git clone --branch 8.x-2.x https://git.drupalcode.org/project/admin_toolbar.git
```
Inside the contrib module folder, create a branch in the format `ISSUE####-COMMENT#.patch`:

```
cd admin_toolbar
git checkout -b 1234567-admin_toolbar-improved-paths
```
When you are ready to create the patch, add any new files and updates to existing files, and create the patch:

```
git add -A
git diff 1234567-admin_toolbar-improved-paths > 1234567-admin_toolbar-improved-paths.patch
```

## Running Tests

When you create a patch you may have written tests for it that you want to run. At a minimum you'll want to run the tests for the module the patch is for to make sure your changes have not introduced regressions. To run the tests use the `lando test` command. To see what you can do use:
Expand Down

0 comments on commit 9854e2f

Please sign in to comment.