github.com/ahmet2mir/goreleaser@v0.180.3-0.20210927151101-8e5ee5a9b8c5/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 `{{ .Version }}-SNAPSHOT-{{.ShortCommit}}`. 20 name_template: '{{ incpatch .Version }}-devel' 21 ``` 22 23 ## How it works 24 25 When you run GoReleaser with `--snapshot`, it will set the `Version` template variable to the evaluation of `snapshot.name_template`. 26 This means that if you use `{{ .Version }}` on your name templates, you'll get the snapshot version. 27 28 You can also check if its a snapshot build inside a template with: 29 30 ``` 31 {{ if .IsSnapshot }}something{{ else }}something else{{ end }} 32 ``` 33 34 !!! tip 35 Learn more about the [name template engine](/customization/templates/). 36 37 Note that the idea behind GoReleaser's snapshots is for local builds or to validate your build on the CI pipeline. 38 Artifacts wont't be uploaded and will only be generated into the `dist` folder. 39 40 !!! info "Maybe you are looking for something else?" 41 - If just want to build the binaries, and no packages at all, check the [`goreleaser build` command](/cmd/goreleaser_build/); 42 - If you actually want to create nightly builds, check out the [nightly documentation](/customization/nightly/).