2017-09-10 22:07:28 +02:00
|
|
|
---
|
|
|
|
title: Snapshots
|
2018-04-25 07:20:12 +02:00
|
|
|
series: customization
|
|
|
|
hideFromIndex: true
|
|
|
|
weight: 70
|
2017-09-10 22:07:28 +02:00
|
|
|
---
|
|
|
|
|
2017-10-01 18:57:52 +02:00
|
|
|
Sometimes we want to generate a full build of our project,
|
|
|
|
but neither want to validate anything nor upload it to anywhere.
|
2018-12-13 16:07:54 +02:00
|
|
|
|
2017-10-01 18:57:52 +02:00
|
|
|
GoReleaser supports this with the `--snapshot` flag
|
|
|
|
and also with the `snapshot` customization section:
|
2017-09-10 22:07:28 +02:00
|
|
|
|
|
|
|
```yml
|
|
|
|
# .goreleaser.yml
|
|
|
|
snapshot:
|
|
|
|
# Allows you to change the name of the generated snapshot
|
2018-12-13 15:01:39 +02:00
|
|
|
# Default is `SNAPSHOT-{{.ShortCommit}}`.
|
2017-09-10 22:07:28 +02:00
|
|
|
name_template: SNAPSHOT-{{.Commit}}
|
|
|
|
```
|
2018-07-09 08:57:46 +02:00
|
|
|
|
|
|
|
> Learn more about the [name template engine](/templates).
|
2018-12-13 16:07:54 +02:00
|
|
|
|
|
|
|
Note that the idea behind GoReleaser's snapshots if mostly for local builds
|
|
|
|
or to validate your build on the CI pipeline. Artifacts shouldn't be uploaded
|
|
|
|
anywhere, and will only be generated to the `dist` folder.
|