1
0
mirror of https://github.com/goreleaser/goreleaser.git synced 2025-11-06 09:09:29 +02:00

docs: update

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
This commit is contained in:
Carlos Alexandro Becker
2024-08-03 14:30:10 -03:00
parent df40d18ed8
commit 50ee54ac6e
8 changed files with 36 additions and 9 deletions

1
.gitignore vendored
View File

@@ -15,3 +15,4 @@ completions/
manpages
output.json
.direnv
*.pyc

View File

@@ -28,7 +28,7 @@ goreleaser build [flags]
-o, --output string Copy the binary to the path after the build. Only taken into account when using --single-target and a single id (either with --id or if configuration only has one build)
-p, --parallelism int Number of tasks to run concurrently (default: number of CPUs)
--single-target Builds only for current GOOS and GOARCH, regardless of what's set in the configuration file
--skip strings Skip the given options (valid options are: after, before, before-publish, post-hooks, pre-hooks, validate)
--skip strings Skip the given options (valid options are: after, before, before-publish, post-hooks, pre-hooks, report-sizes, validate)
--snapshot Generate an unversioned snapshot build, skipping all validations
--timeout duration Timeout to the entire build process (default 30m0s)
```

View File

@@ -27,7 +27,7 @@ goreleaser release [flags]
--release-notes string Load custom release notes from a markdown file (will skip GoReleaser changelog generation)
--release-notes-tmpl string Load custom release notes from a templated markdown file (overrides --release-notes)
--single-target Builds only for current GOOS and GOARCH, regardless of what's set in the configuration file (implies --skip=publish) (Pro only)
--skip strings Skip the given options (valid options are: after, announce, archive, aur, before, before-publish, chocolatey, cloudsmith, dmg, docker, dockerhub, fury, homebrew, ko, msi, nfpm, nix, notarize, publish, sbom, scoop, sign, snapcraft, validate, winget)
--skip strings Skip the given options (valid options are: after, announce, archive, aur, before, before-publish, chocolatey, cloudsmith, dmg, docker, dockerhub, fury, homebrew, ko, msi, nfpm, nix, notarize, publish, report-sizes, sbom, scoop, sign, snapcraft, validate, winget)
--snapshot Generate an unversioned snapshot release, skipping all validations and without publishing any artifacts (implies --skip=announce,publish,validate)
--split Split the build so it can be merged and published later (implies --prepare) (Pro only)
--timeout duration Timeout to the entire release process (default 30m0s)

View File

@@ -51,6 +51,14 @@ docker_signs:
- foo
- bar
# Allows to further filter the artifacts.
#
# Artifacts that do not match this expression will be ignored.
#
# Since: v2.2 (pro).
# Templates: allowed.
if: '{{ if eq .Os "linux" }}'
# Stdin data to be given to the signature command as stdin.
#
# Templates: allowed.

View File

@@ -76,6 +76,14 @@ signs:
- foo
- bar
# Allows to further filter the artifacts.
#
# Artifacts that do not match this expression will be ignored.
#
# Since: v2.2 (pro).
# Templates: allowed.
if: '{{ if eq .Os "linux" }}'
# Stdin data to be given to the signature command as stdin.
#
# Templates: allowed.

View File

@@ -42,9 +42,6 @@ In fields that support templates, these fields are always available:
| `.Now` | current UTC date as `time.Time` struct, allows all `time.Time` functions (e.g. `{{ .Now.Format "2006" }}`) |
| `.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[^panic-if-not-semver] |
| `incminor "v1.2.4"` | increments the minor of the given version[^panic-if-not-semver] |
| `incmajor "v1.2.4"` | increments the major of the given version[^panic-if-not-semver] |
| `.ReleaseURL` | the current release download url[^scm-release-url] |
| `.Summary` | the git summary, e.g. `v1.0.0-10-g34f56g3`[^git-summary] |
| `.PrefixedSummary` | the git summary prefixed with the monorepo config tag prefix (if any) |
@@ -63,8 +60,6 @@ In fields that support templates, these fields are always available:
[^tag-is-semver]: Assuming `Tag` is a valid a SemVer, otherwise empty/zeroed.
[^panic-if-not-semver]: Will panic if not a semantic version.
[^scm-release-url]:
Composed of the current SCM's download URL and current tag.
For instance, on GitHub, it'll be
@@ -166,6 +161,13 @@ On all fields, you have these available functions:
| `isEnvSet "NAME"` | returns true if the env is set and not empty, false otherwise |
| `$m := map "KEY" "VALUE"` | creates a map from a list of key and value pairs. Both keys and values must be of type `string` |
| `indexOrDefault $m "KEY" "value"` | either gets the value of the given key or the given default value from the given map |
| `incpatch "v1.2.4"` | increments the patch of the given version[^panic-if-not-semver] |
| `incminor "v1.2.4"` | increments the minor of the given version[^panic-if-not-semver] |
| `incmajor "v1.2.4"` | increments the major of the given version[^panic-if-not-semver] |
| `list "a" "b" "c"` | makes a list of strings[^pro] |
| `in (list "a" "b" "c") "b"` | checks if a slice contains a value[^pro] |
[^panic-if-not-semver]: Will panic if not a semantic version.
With all those fields, you may be able to compose the name of your artifacts
pretty much the way you want:

12
www/docs/static/schema-pro.json generated vendored
View File

@@ -2271,7 +2271,8 @@
"deb",
"rpm",
"termux.deb",
"archlinux"
"archlinux",
"ipk"
]
},
"type": "array"
@@ -3680,6 +3681,9 @@
},
"type": "array"
},
"if": {
"type": "string"
},
"stdin": {
"type": "string"
},
@@ -3816,7 +3820,8 @@
"strict",
"classic",
"devmode"
]
],
"default": "strict"
},
"assumes": {
"items": {
@@ -4035,6 +4040,9 @@
"properties": {
"name_template": {
"type": "string"
},
"version_template": {
"type": "string"
}
},
"additionalProperties": false,