1
0
mirror of https://github.com/goreleaser/goreleaser.git synced 2025-01-10 03:47:03 +02:00
goreleaser/www/docs/customization/nightly.md
Carlos A Becker 2be6f399bf
docs: improve search
fixes #2616
2021-10-30 09:50:23 -03:00

1.7 KiB

Nightly

!!! success "GoReleaser Pro" The nightly build feature is a GoReleaser Pro feature.

Whether if you need beta builds or a rolling-release system, the nightly builds feature gets you covered.

To enable it, you must use the --nightly flag in the goreleaser release command.

You also have some customization options available:

# .goreleaser.yml
nightly:
  # Allows you to change the version of the generated nightly release.
  #
  # Note that some pipes require this to be semantic version compliant (nfpm, for example).
  #
  # Default is `{{ incpatch .Version }}-{{ .ShortCommit }}-dev`.
  name_template: '{{ incpatch .Version }}-devel'

How it works

When you run GoReleaser with --nightly, it will set the Version template variable to the evaluation of nightly.name_template. This means that if you use {{ .Version }} on your name templates, you'll get the nightly version.

!!! tip Learn more about the name template engine.

What is skipped when using --nightly?

  • Go mod proxying;
  • GitHub/GitLab/Gitea releases;
  • Homebrew taps;
  • Scoop manifests;
  • Milestone closing;
  • All announcers;

Everything else is executed normally. Just make sure to use the Version template variable instead of Tag. You can also check if its a nightly build inside a template with:

{{ if .IsNightly }}something{{ else }}something else{{ end }}

!!! info "Maybe you are looking for something else?" - If just want to build the binaries, and no packages at all, check the goreleaser build command; - If you actually want to create a local "snapshot" build, check out the snapshots documentation.