2018-02-18 23:32:16 +01:00
# Contributing
2021-11-12 21:18:34 +01:00
By participating to this project, you agree to abide our [code of conduct ](https://github.com/goreleaser/nfpm/blob/main/CODE_OF_CONDUCT.md ).
2018-02-18 23:32:16 +01:00
## Setup your machine
`nfpm` is written in [Go ](https://golang.org/ ).
Prerequisites:
2021-10-10 19:44:08 +02:00
- [Task ](https://taskfile.dev/#/installation )
2022-05-23 15:04:59 +02:00
- [Go 1.18+ ](https://golang.org/doc/install )
2021-10-10 19:44:08 +02:00
- [Docker ](https://www.docker.com/ )
- `gpg` (probably already installed on your system)
2018-02-18 23:32:16 +01:00
2018-11-28 13:36:21 +01:00
Clone `nfpm` from source:
2018-02-18 23:32:16 +01:00
```sh
2021-10-10 19:44:08 +02:00
git clone git@github.com:goreleaser/nfpm.git
cd nfpm
2018-02-18 23:32:16 +01:00
```
Install the build and lint dependencies:
```console
2021-10-10 19:44:08 +02:00
task setup
2018-02-18 23:32:16 +01:00
```
A good way of making sure everything is all right is running the test suite:
```console
2021-10-10 19:44:08 +02:00
task test
2018-02-18 23:32:16 +01:00
```
2019-11-11 22:57:10 +01:00
If on the ARM tests you are seeing `standard_init_linux.go:211: exec user process caused "exec format error"` :
```console
2021-10-10 19:44:08 +02:00
sudo docker run --rm --privileged hypriot/qemu-register
2019-11-11 22:57:10 +01:00
```
2018-02-18 23:32:16 +01:00
## Test your change
You can create a branch for your changes and try to build from the source as you go:
```console
2021-10-10 19:44:08 +02:00
task build
2018-02-18 23:32:16 +01:00
```
When you are satisfied with the changes, we suggest you run:
```console
2021-10-10 19:44:08 +02:00
task ci
2018-02-18 23:32:16 +01:00
```
Which runs all the linters and tests.
## Create a commit
Commit messages should be well formatted.
Start your commit message with the type. Choose one of the following:
`feat` , `fix` , `docs` , `style` , `refactor` , `perf` , `test` , `chore` , `revert` , `add` , `remove` , `move` , `bump` , `update` , `release`
After a colon, you should give the message a title, starting with uppercase and ending without a dot.
Keep the width of the text at 72 chars.
The title must be followed with a newline, then a more detailed description.
Please reference any GitHub issues on the last line of the commit message (e.g. `See #123` , `Closes #123` , `Fixes #123` ).
An example:
```
docs: Add example for --release-notes flag
I added an example to the docs of the `--release-notes` flag to make
2022-02-21 19:53:33 +01:00
the usage more clear. The example is a realistic use case and might
2018-02-18 23:32:16 +01:00
help others to generate their own changelog.
See #284
```
## Submit a pull request
2021-11-12 21:18:34 +01:00
Push your branch to your `nfpm` fork and open a pull request against the main branch.
2018-02-18 23:32:16 +01:00
## Financial contributions
We also welcome financial contributions in full transparency on our [open collective ](https://opencollective.com/goreleaser ).
Anyone can file an expense. If the expense makes sense for the development of the community, it will be "merged" in the ledger of our open collective by the core contributors and the person who filed the expense will be reimbursed.