2021-10-10 11:16:03 -03:00
|
|
|
# Contributing
|
2018-09-12 13:34:26 -03:00
|
|
|
|
2022-10-05 09:42:05 -03:00
|
|
|
By participating in this project, you agree to abide our
|
|
|
|
[code of conduct](https://github.com/goreleaser/.github/blob/main/CODE_OF_CONDUCT.md).
|
2018-09-12 13:34:26 -03:00
|
|
|
|
2022-10-05 09:42:05 -03:00
|
|
|
## Set up your machine
|
2021-10-10 11:16:03 -03:00
|
|
|
|
2024-05-12 19:22:56 +03:00
|
|
|
`goreleaser` is written in [Go](https://go.dev/).
|
2021-10-10 11:16:03 -03:00
|
|
|
|
|
|
|
Prerequisites:
|
|
|
|
|
2023-07-13 17:23:36 +00:00
|
|
|
- [Task](https://taskfile.dev/installation)
|
2024-02-20 22:27:42 -03:00
|
|
|
- [Go 1.22+](https://go.dev/doc/install)
|
2021-10-10 11:16:03 -03:00
|
|
|
|
|
|
|
Other things you might need to run the tests:
|
|
|
|
|
|
|
|
- [cosign](https://github.com/sigstore/cosign)
|
|
|
|
- [Docker](https://www.docker.com/)
|
|
|
|
- [GPG](https://gnupg.org)
|
|
|
|
- [Podman](https://podman.io/)
|
|
|
|
- [Snapcraft](https://snapcraft.io/)
|
2022-11-04 15:03:53 -04:00
|
|
|
- [Syft](https://github.com/anchore/syft)
|
2023-11-27 18:29:50 -03:00
|
|
|
- [upx](https://upx.github.io/)
|
2021-10-10 11:16:03 -03:00
|
|
|
|
|
|
|
Clone `goreleaser` anywhere:
|
|
|
|
|
|
|
|
```sh
|
|
|
|
git clone git@github.com:goreleaser/goreleaser.git
|
|
|
|
```
|
|
|
|
|
|
|
|
`cd` into the directory and install the dependencies:
|
|
|
|
|
|
|
|
```sh
|
|
|
|
task setup
|
|
|
|
```
|
|
|
|
|
|
|
|
A good way of making sure everything is all right is running the test suite:
|
|
|
|
|
|
|
|
```sh
|
|
|
|
task test
|
|
|
|
```
|
|
|
|
|
2024-04-01 15:42:00 -03:00
|
|
|
### A note about Docker multi-arch builds
|
|
|
|
|
|
|
|
If you want to properly run the Docker tests, or run `goreleaser release
|
|
|
|
--snapshot` locally, you might need to setup Docker for it.
|
|
|
|
You can do so by running:
|
|
|
|
|
|
|
|
```sh
|
|
|
|
task docker:setup
|
|
|
|
```
|
|
|
|
|
2021-10-10 11:16:03 -03:00
|
|
|
## Test your change
|
|
|
|
|
|
|
|
You can create a branch for your changes and try to build from the source as you go:
|
|
|
|
|
|
|
|
```sh
|
|
|
|
task build
|
|
|
|
```
|
|
|
|
|
|
|
|
When you are satisfied with the changes, we suggest you run:
|
|
|
|
|
|
|
|
```sh
|
|
|
|
task ci
|
|
|
|
```
|
|
|
|
|
2021-11-24 23:43:50 +00:00
|
|
|
Before you commit the changes, we also suggest you run:
|
|
|
|
|
|
|
|
```sh
|
|
|
|
task fmt
|
|
|
|
```
|
|
|
|
|
2021-10-10 11:16:03 -03:00
|
|
|
## Create a commit
|
|
|
|
|
|
|
|
Commit messages should be well formatted, and to make that "standardized", we
|
|
|
|
are using Conventional Commits.
|
|
|
|
|
|
|
|
You can follow the documentation on
|
|
|
|
[their website](https://www.conventionalcommits.org).
|
|
|
|
|
|
|
|
## Submit a pull request
|
|
|
|
|
2021-11-12 17:23:32 -03:00
|
|
|
Push your branch to your `goreleaser` fork and open a pull request against the main branch.
|
2021-10-10 11:16:03 -03:00
|
|
|
|
|
|
|
## Financial contributions
|
|
|
|
|
2022-09-04 02:29:09 +00:00
|
|
|
You can contribute in our OpenCollective or to any of the contributors directly.
|
|
|
|
See [this page](https://goreleaser.com/sponsors) for more details.
|