github.com/joselitofilho/goreleaser@v0.155.1-0.20210123221854-e4891856c593/www/docs/customization/snapshots.md (about) 1 --- 2 title: Snapshots 3 --- 4 5 Sometimes we want to generate a full build of our project, 6 but neither want to validate anything nor upload it to anywhere. 7 8 GoReleaser supports this with the `--snapshot` flag 9 and also with the `snapshot` customization section: 10 11 ```yaml 12 # .goreleaser.yml 13 snapshot: 14 # Allows you to change the name of the generated snapshot 15 # 16 # Note that some pipes require this to be semantic version compliant (nfpm, 17 # for example). 18 # 19 # Default is `{{ .Tag }}-SNAPSHOT-{{.ShortCommit}}`. 20 name_template: 1.2.3-SNAPSHOT-{{.Commit}} 21 ``` 22 23 ## How it works 24 25 When you run GoReleaser with `--snapshot`, it will set the `Version` template 26 variable to the evaluation of `snapshot.name_template`. 27 28 This means that if you use `{{ .Version }}` on your name templates, you'll 29 get the snapshot version. 30 31 !!! tip 32 Learn more about the [name template engine](/customization/templates/). 33 34 Note that the idea behind GoReleaser's snapshots if mostly for local builds 35 or to validate your build on the CI pipeline. Artifacts shouldn't be uploaded 36 anywhere, and will only be generated to the `dist` folder.