1
0
mirror of https://github.com/goreleaser/goreleaser.git synced 2025-03-17 20:47:50 +02:00

docs: improve reproducible builds

This commit is contained in:
Carlos A Becker 2022-12-16 11:14:33 -03:00
parent 691234d402
commit 27af559a62
No known key found for this signature in database
GPG Key ID: E61E2F7DC14AB940

View File

@ -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,
@ -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