mirror of
https://github.com/restic/rest-server.git
synced 2025-10-19 07:33:21 +00:00
Improve reproducibility of built archives
The binaries and generate archives should be reproducible now. Note that this does not apply to the source tarball.
This commit is contained in:
parent
dedcb846df
commit
0a09c8d633
1 changed files with 17 additions and 3 deletions
|
@ -31,6 +31,8 @@ builds:
|
|||
# don't include any paths to source files in the resulting binary
|
||||
- -trimpath
|
||||
|
||||
mod_timestamp: '{{ .CommitTimestamp }}'
|
||||
|
||||
ldflags:
|
||||
# set the version variable in the main package
|
||||
- "-s -w -X main.version={{ .Version }}"
|
||||
|
@ -66,11 +68,23 @@ archives:
|
|||
# package a directory which contains the source file
|
||||
wrap_in_directory: true
|
||||
|
||||
builds_info: &archive_file_info
|
||||
owner: root
|
||||
group: root
|
||||
mtime: '{{ .CommitDate }}'
|
||||
mode: 0644
|
||||
|
||||
# add these files to all archives
|
||||
files:
|
||||
- LICENSE
|
||||
- README.md
|
||||
- CHANGELOG.md
|
||||
- src: LICENSE
|
||||
dst: .
|
||||
info: *archive_file_info
|
||||
- src: README.md
|
||||
dst: .
|
||||
info: *archive_file_info
|
||||
- src: CHANGELOG.md
|
||||
dst: .
|
||||
info: *archive_file_info
|
||||
|
||||
# also build an archive of the source code
|
||||
source:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue