Skip to content

Commit

Permalink
docs: improve reproducible builds
Browse files Browse the repository at this point in the history
  • Loading branch information
caarlos0 committed Dec 16, 2022
1 parent 691234d commit 27af559
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions www/docs/customization/build.md
Expand Up @@ -176,7 +176,7 @@ builds:
# Set the modified timestamp on the output binary, typically
# you would do this to ensure a build was reproducible. Pass
# empty string to skip modifying the output.
# Default is empty string.
# Default is empty string, which will be the compile time.
mod_timestamp: '{{ .CommitTimestamp }}'

# Hooks can be used to customize the final binary,
Expand Down Expand Up @@ -426,8 +426,9 @@ GoReleaser:
* Modify `ldflags`: by default `main.Date` is set to the time GoReleaser is run
(`{{.Date}}`), you can set this to `{{.CommitDate}}` or just not pass the
variable.
* Modify `mod_timestamp`: by default this is empty string, set to
`{{.CommitTimestamp}}` or a constant value instead.
* Modify `mod_timestamp`: by default this is empty string — which means it'll be
the compilation time, set to `{{.CommitTimestamp}}` or a constant value
instead.
* If you do not run your builds from a consistent directory structure, pass
`-trimpath` to `flags`.
* Remove uses of the `time` template function. This function returns a new value
Expand Down

0 comments on commit 27af559

Please sign in to comment.