CONTRIBUTING.md 2.42 KB
Newer Older
1
2
3
4
5
6
# Contributing to Linuxbrew

[Linuxbrew](https://github.com/Linuxbrew/homebrew-core) is a fork of [Homebrew](https://github.com/Homebrew/homebrew-core). Homebrew is merged into Linuxbrew roughly once per week. To contribute a new formula or a new version of an existing formula, please submit your pull request to Homebrew rather than to Linuxbrew. Patches to fix issues that you have reproduced on both Linuxbrew and Homebrew should be sent to Homebrew. Please send your pull request to Linuxbrew if you are in doubt.

Patches to fix issues particular to Linux should not affect the behaviour of the formula on Mac. Use `if OS.mac?` and `if OS.linux?` as necessary to preserve the existing behaviour on Mac.

Andrew Janke's avatar
Andrew Janke committed
7
8
# Contributing to Homebrew

9
First time contributing to Homebrew? Read our [Code of Conduct](https://github.com/Homebrew/brew/blob/master/CODE_OF_CONDUCT.md#code-of-conduct).
Andrew Janke's avatar
Andrew Janke committed
10
11
12
13
14

### Report a bug

* run `brew update` (twice)
* run and read `brew doctor`
Mike McQuaid's avatar
Mike McQuaid committed
15
* read [the Troubleshooting Checklist](https://docs.brew.sh/Troubleshooting)
Andrew Janke's avatar
Andrew Janke committed
16
17
* open an issue on the formula's repository

18
### Submit a version upgrade for the `foo` formula
Andrew Janke's avatar
Andrew Janke committed
19
20

* check if the same upgrade has been already submitted by [searching the open pull requests for `foo`](https://github.com/Homebrew/homebrew-core/pulls?utf8=✓&q=is%3Apr+is%3Aopen+foo).
21
* `brew bump-formula-pr --strict foo` with `--url=...` and `--sha256=...` or `--tag=...` and `--revision=...` arguments.
Andrew Janke's avatar
Andrew Janke committed
22
23
24

### Add a new formula for `foo` version `2.3.4` from `$URL`

Mike McQuaid's avatar
Mike McQuaid committed
25
* read [the Formula Cookbook](https://docs.brew.sh/Formula-Cookbook) or: `brew create $URL` and make edits
Chelsea Voss's avatar
Chelsea Voss committed
26
* `brew install --build-from-source foo`
27
* `brew audit --new-formula foo`
Andrew Janke's avatar
Andrew Janke committed
28
* `git commit` with message formatted `foo 2.3.4 (new formula)`
Mike McQuaid's avatar
Mike McQuaid committed
29
* [open a pull request](https://docs.brew.sh/How-To-Open-a-Homebrew-Pull-Request) and fix any failing tests
Andrew Janke's avatar
Andrew Janke committed
30
31
32
33

### Contribute a fix to the `foo` formula

* `brew edit foo` and make edits
34
* leave the [`bottle`](http://www.rubydoc.info/github/Homebrew/brew/master/Formula#bottle-class_method) as-is
35
* `brew uninstall --force foo`, `brew install --build-from-source foo`, `brew test foo`, and `brew audit --strict foo`
36
* `git commit` with message formatted `foo: <insert details>`
Mike McQuaid's avatar
Mike McQuaid committed
37
* [open a pull request](https://docs.brew.sh/How-To-Open-a-Homebrew-Pull-Request) and fix any failing tests
38
* If the fix is relevant to macOS, please submit the PR to Homebrew. If it is only relevant to Linux, please submit it to Linuxbrew
Andrew Janke's avatar
Andrew Janke committed
39
40

Thanks!