2022-09-17 05:13:09 +02:00
|
|
|
# Git is in a dirty state
|
2021-11-21 17:47:25 +02:00
|
|
|
|
|
|
|
GoReleaser requires a clean git state to work.
|
|
|
|
|
2022-09-17 05:13:09 +02:00
|
|
|
If you see this error, it means that something in your build process is either
|
|
|
|
creating or editing files before GoReleaser is called. The error message should
|
|
|
|
show you, which files were created/modified.
|
2021-11-21 17:47:25 +02:00
|
|
|
|
|
|
|
Here's an example error:
|
|
|
|
|
|
|
|
```sh
|
|
|
|
⨯ release failed after 0.02s error=git is currently in a dirty state
|
|
|
|
Please check in your pipeline what can be changing the following files:
|
|
|
|
M modified.go
|
|
|
|
?? created.txt
|
|
|
|
|
|
|
|
Learn more at https://goreleaser.com/errors/dirty
|
|
|
|
```
|
|
|
|
|
|
|
|
From here on, you have a couple of options:
|
|
|
|
|
2022-09-17 05:13:09 +02:00
|
|
|
- add the file to `.gitignore` (recommended if the file is temporary and/or
|
|
|
|
generated);
|
2022-11-11 03:30:18 +02:00
|
|
|
- change your build process to not touch any git tracked files.
|
2023-01-31 04:25:15 +02:00
|
|
|
- if you are running `goreleaser build`, you might want to add either the
|
|
|
|
`--snapshot` or `--skip-validate` flags to it
|