1
0
mirror of https://github.com/goreleaser/goreleaser.git synced 2025-02-01 13:07:49 +02:00

docs: nightly pro feature

Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
This commit is contained in:
Carlos Alexandro Becker 2021-09-24 20:18:52 -03:00
parent 0534b4083f
commit 3d62f95fd5
No known key found for this signature in database
GPG Key ID: E61E2F7DC14AB940
7 changed files with 88 additions and 31 deletions

View File

@ -13,6 +13,7 @@ goreleaser release [flags]
-f, --config string Load configuration from file
-h, --help help for release
-k, --key string GoReleaser Pro license key [$GORELEASER_KEY]
--nightly Generate a nightly build, publishing artifacts that support it (implies --skip-announce and --skip-validate)
-p, --parallelism int Amount tasks to run concurrently (default: number of CPUs)
--release-footer string Load custom release notes footer from a markdown file
--release-footer-tmpl string Load custom release notes footer from a templated markdown file (overrides --release-footer)
@ -20,12 +21,12 @@ goreleaser release [flags]
--release-header-tmpl string Load custom release notes header from a templated markdown file (overrides --release-header)
--release-notes string Load custom release notes from a markdown file
--release-notes-tmpl string Load custom release notes from a templated markdown file (overrides --release-notes)
--rm-dist Remove the dist folder before building
--rm-dist Removes the dist folder
--skip-announce Skips announcing releases (implies --skip-validate)
--skip-publish Skips publishing artifacts
--skip-sign Skips signing the artifacts
--skip-validate Skips several sanity checks
--snapshot Generate an unversioned snapshot release, skipping all validations and without publishing any artifacts (implies --skip-publish, --skip-announce and --skip-validate)
--skip-sign Skips signing artifacts
--skip-validate Skips git checks
--snapshot Generate an unversioned snapshot release, skipping all validations and without publishing any artifacts (implies --skip-publish, --skip-announce and --skip-validate, overrides --nightly)
--timeout duration Timeout to the entire release process (default 30m0s)
```

View File

@ -0,0 +1,51 @@
---
title: Nightly
---
!!! success "GoReleaser Pro"
The nightly build feature is a [GoReleaser Pro feature](/pro/).
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](/cmd/goreleaser_release/).
You also have some customization options available:
```yaml
# .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](/customization/templates/).
## 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](/cmd/goreleaser_build/);
- If you actually want to create a local "snapshot" build, check out the [snapshots documentation](/customization/snapshots/).

View File

@ -38,4 +38,5 @@ Note that the idea behind GoReleaser's snapshots is for local builds or to valid
Artifacts wont't be uploaded and will only be generated into the `dist` folder.
!!! 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](/cmd/goreleaser_build/);
- If just want to build the binaries, and no packages at all, check the [`goreleaser build` command](/cmd/goreleaser_build/);
- If you actually want to create nightly builds, check out the [nightly documentation](/customization/nightly/).

View File

@ -10,32 +10,33 @@ support templating.
On fields that support templating, these fields are always available:
| Key | Description |
|---------------------|------------------------------------------------------------------------------------------------------------------------------|
| `.ProjectName` | the project name |
| `.Version` | the version being released (`v` prefix stripped),<br>or what is configured in `snapshot.name_template` in case of a snapshot release (defaults to `{{ .Version }}-SNAPSHOT-{{.ShortCommit}}`) |
| `.Branch` | the current git branch |
| `.PrefixedTag` | the current git tag prefixed with the monorepo config tag prefix (if any) |
| `.Tag` | the current git tag |
| `.ShortCommit` | the git commit short hash |
| `.FullCommit` | the git commit full hash |
| `.Commit` | the git commit hash (deprecated) |
| `.CommitDate` | the UTC commit date in RFC 3339 format |
| `.CommitTimestamp` | the UTC commit date in Unix format |
| `.GitURL` | the git remote url |
| `.Major` | the major part of the version (assuming `Tag` is a valid semver, else `0`) |
| `.Minor` | the minor part of the version (assuming `Tag` is a valid semver, else `0`) |
| `.Patch` | the patch part of the version (assuming `Tag` is a valid semver, else `0`) |
| `.Prerelease` | the prerelease part of the version, e.g. `beta` (assuming `Tag` is a valid semver) |
| `.RawVersion` | Major.Minor.Patch (assuming `Tag` is a valid semver, else `0.0.0`) |
| `.IsSnapshot` | `true` if a snapshot is being released, `false` otherwise |
| `.Env` | a map with system's environment variables |
| `.Date` | current UTC date in RFC 3339 format |
| `.Timestamp` | current UTC time in Unix format |
| `.ModulePath` | the go module path, as reported by `go list -m` |
| `incpatch "v1.2.4"` | increments the patch of the given version; will panic if not a semantic version |
| `incminor "v1.2.4"` | increments the minor of the given version; will panic if not a semantic version |
| `incmajor "v1.2.4"` | increments the major of the given version; will panic if not a semantic version |
| Key | Description |
|---------------------|--------------------------------------------------------------------------------------------------------|
| `.ProjectName` | the project name |
| `.Version` | the version being released (`v` prefix stripped) - might be changed in `snapshot` and `nightly` builds |
| `.Branch` | the current git branch |
| `.PrefixedTag` | the current git tag prefixed with the monorepo config tag prefix (if any) |
| `.Tag` | the current git tag |
| `.ShortCommit` | the git commit short hash |
| `.FullCommit` | the git commit full hash |
| `.Commit` | the git commit hash (deprecated) |
| `.CommitDate` | the UTC commit date in RFC 3339 format |
| `.CommitTimestamp` | the UTC commit date in Unix format |
| `.GitURL` | the git remote url |
| `.Major` | the major part of the version (assuming `Tag` is a valid semver, else `0`) |
| `.Minor` | the minor part of the version (assuming `Tag` is a valid semver, else `0`) |
| `.Patch` | the patch part of the version (assuming `Tag` is a valid semver, else `0`) |
| `.Prerelease` | the prerelease part of the version, e.g. `beta` (assuming `Tag` is a valid semver) |
| `.RawVersion` | Major.Minor.Patch (assuming `Tag` is a valid semver, else `0.0.0`) |
| `.IsSnapshot` | `true` if `--snapshot` is set, `false` otherwise |
| `.IsNightly` | `true` if `--nightly` is set, `false` otherwise |
| `.Env` | a map with system's environment variables |
| `.Date` | current UTC date in RFC 3339 format |
| `.Timestamp` | current UTC time in Unix format |
| `.ModulePath` | the go module path, as reported by `go list -m` |
| `incpatch "v1.2.4"` | increments the patch of the given version; will panic if not a semantic version |
| `incminor "v1.2.4"` | increments the minor of the given version; will panic if not a semantic version |
| `incmajor "v1.2.4"` | increments the major of the given version; will panic if not a semantic version |
On fields that are related to a single artifact (e.g., the binary name), you
may have some extra fields:

View File

@ -131,6 +131,7 @@
<ul>
<li>Cross-compile your Go project</li>
<li>Release to GitHub, GitLab and Gitea</li>
<li>Create nightly builds</li>
<li>Create Docker images and manifests</li>
<li>Create Linux packages and Homebrew taps</li>
<li>Sign artifacts, checksums and Docker images</li>

View File

@ -2,6 +2,7 @@
GoReleaser Pro is a paid, closed-source GoReleaser distribution with some additional features:
- [x] Continuously release [nightly builds](/customization/nightly/);
- [x] Import pre-built binaries with the [`prebuilt` builder](/customization/build/#import-pre-built-binaries);
- [x] Rootless build [Docker images](/customization/docker/#podman) and [manifests](/customization/docker_manifest/#podman) with [Podman](https://podman.io);
- [x] Easily create `apt` and `yum` repositories with the [fury.io integration](/customization/fury/);

View File

@ -88,6 +88,7 @@ nav:
- customization/milestone.md
- customization/monorepo.md
- customization/nfpm.md
- customization/nightly.md
- customization/project.md
- customization/publishers.md
- customization/release.md