github.com/goreleaser/nfpm/v2@v2.44.0/CONTRIBUTING.md (about)

     1  # Contributing
     2  
     3  By participating to this project, you agree to abide our [code of conduct](https://github.com/goreleaser/nfpm/blob/main/CODE_OF_CONDUCT.md).
     4  
     5  ## Setup your machine
     6  
     7  `nfpm` is written in [Go](https://golang.org/).
     8  
     9  Prerequisites:
    10  
    11  - [Task](https://taskfile.dev/#/installation)
    12  - [Go 1.21+](https://golang.org/doc/install)
    13  - [Docker](https://www.docker.com/)
    14  - `gpg` (probably already installed on your system)
    15  
    16  Clone `nfpm` from source:
    17  
    18  ```sh
    19  git clone git@github.com:goreleaser/nfpm.git
    20  cd nfpm
    21  ```
    22  
    23  Install the build and lint dependencies:
    24  
    25  ```console
    26  task setup
    27  ```
    28  
    29  A good way of making sure everything is all right is running the test suite:
    30  
    31  ```console
    32  task test
    33  ```
    34  
    35  If on the ARM tests you are seeing `standard_init_linux.go:211: exec user process caused "exec format error"`:
    36  
    37  ```console
    38  sudo docker run --rm --privileged hypriot/qemu-register
    39  ```
    40  
    41  ### A note about Docker multi-arch builds
    42  
    43  If you want to properly run the Docker tests, or run `goreleaser release
    44  --snapshot` locally, you might need to setup Docker for it.
    45  You can do so by running:
    46  
    47  ```sh
    48  task docker:setup
    49  ```
    50  
    51  ## Test your change
    52  
    53  You can create a branch for your changes and try to build from the source as you go:
    54  
    55  ```console
    56  task build
    57  ```
    58  
    59  When you are satisfied with the changes, we suggest you run:
    60  
    61  ```console
    62  task ci
    63  ```
    64  
    65  Which runs all the linters and tests.
    66  
    67  ## Create a commit
    68  
    69  Commit messages should be well formatted.
    70  Start your commit message with the type. Choose one of the following:
    71  `feat`, `fix`, `docs`, `style`, `refactor`, `perf`, `test`, `chore`, `revert`, `add`, `remove`, `move`, `bump`, `update`, `release`
    72  
    73  After a colon, you should give the message a title, starting with uppercase and ending without a dot.
    74  Keep the width of the text at 72 chars.
    75  The title must be followed with a newline, then a more detailed description.
    76  
    77  Please reference any GitHub issues on the last line of the commit message (e.g. `See #123`, `Closes #123`, `Fixes #123`).
    78  
    79  An example:
    80  
    81  ```
    82  docs: Add example for --release-notes flag
    83  
    84  I added an example to the docs of the `--release-notes` flag to make
    85  the usage more clear.  The example is a realistic use case and might
    86  help others to generate their own changelog.
    87  
    88  See #284
    89  ```
    90  
    91  ## Submit a pull request
    92  
    93  Push your branch to your `nfpm` fork and open a pull request against the main branch.
    94  
    95  ## Financial contributions
    96  
    97  We also welcome financial contributions in full transparency on our [open collective](https://opencollective.com/goreleaser).
    98  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.