From 53bd97781027c00f7a7a63c86dd9fe6eac62eaf4 Mon Sep 17 00:00:00 2001 From: Carlos A Becker Date: Thu, 25 Nov 2021 00:20:40 -0300 Subject: [PATCH] docs: minor improvements Signed-off-by: Carlos A Becker --- www/docs/customization/templates.md | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/www/docs/customization/templates.md b/www/docs/customization/templates.md index 8fb12a3f8..8ff8e8375 100644 --- a/www/docs/customization/templates.md +++ b/www/docs/customization/templates.md @@ -24,7 +24,6 @@ On fields that support templating, these fields are always available: | `.CommitDate` | the UTC commit date in RFC 3339 format | | `.CommitTimestamp` | the UTC commit date in Unix format | | `.GitURL` | the git remote url | -| `.Summary` | the git summary (git describe --dirty --always --tags) Format: `TAG-N-COMMIT` (eg 1.0.0-10-g34f56g3) | | `.Major` | the major part of the version[^2] | | `.Minor` | the minor part of the version[^2] | | `.Patch` | the patch part of the version[^2] | @@ -41,11 +40,13 @@ On fields that support templating, these fields are always available: | `incminor "v1.2.4"` | increments the minor of the given version[^3] | | `incmajor "v1.2.4"` | increments the major of the given version[^3] | | `.ReleaseURL` | the current release download url[^4] | +| `.Summary` | the git summary, e.g. `v1.0.0-10-g34f56g3`[^5] | [^1]: The `v` prefix is stripped and it might be changed in `snapshot` and `nightly` builds. [^2]: Assuming `Tag` is a valid a SemVer, otherwise empty/zeroed. [^3]: Will panic if not a semantic version. [^4]: Composed from the current SCM's download URL and current tag. For instance, on GitHub, it'll be `https://github.com/{owner}/{repo}/releases/tag/{tag}`. +[^5]: It is generated by `git describe --dirty --always --tags`, the format will be `{Tag}-$N-{CommitSHA}` ## Single-artifact extra fields @@ -54,15 +55,15 @@ may have some extra fields: | Key | Description | |-----------------|---------------------------------------| -| `.Os` | `GOOS`[^5] | -| `.Arch` | `GOARCH`[^5] | -| `.Arm` | `GOARM`[^5] | -| `.Mips` | `GOMIPS`[^5] | +| `.Os` | `GOOS`[^6] | +| `.Arch` | `GOARCH`[^6] | +| `.Arm` | `GOARM`[^6] | +| `.Mips` | `GOMIPS`[^6] | | `.Binary` | binary name | | `.ArtifactName` | archive name | | `.ArtifactPath` | absolute path to artifact | -[^5]: Might have been replaced by `archives.replacements`. +[^6]: Might have been replaced by `archives.replacements`. ## nFPM extra fields