Files
kopia/.goreleaser.yml
Julio Lopez b7f811cfc9 chore(ci): build kopia with -trimpath (#4983)
Rationale: move towards reproducible (hermetic) builds.

The `-trimpath` flag removes absolute file system paths
from the resulting executables.

- add `-trimpath` to `KOPIA_BUILD_FLAGS`
- add `-trimpath` to `goreleaser` config
- move `KOPIA_BUILD_*` var defs to `Makefile`
2025-11-13 10:31:28 -08:00

71 lines
1.7 KiB
YAML

# This is an example goreleaser.yaml file with some sane defaults.
# Make sure to check the documentation at http://goreleaser.com
builds:
- env:
- CGO_ENABLED=0
goos:
- linux
- freebsd
- openbsd
goarch:
- amd64
- arm
- arm64
flags:
- -trimpath
ldflags:
- -s -w -X "github.com/kopia/kopia/repo.BuildVersion={{.Version}}" -X "github.com/kopia/kopia/repo.BuildInfo={{.Commit}}" -X "github.com/kopia/kopia/repo.BuildGitHubRepo={{.Env.GITHUB_REPOSITORY}}"
release:
draft: false
archives:
- id: default
replacements:
darwin: macOS
linux: linux
windows: windows
freebsd: freebsd-experimental
openbsd: openbsd-experimental
amd64: x64
name_template: "{{ .ProjectName }}-{{ .Version }}-{{ .Os }}-{{ .Arch }}"
wrap_in_directory: true
format_overrides:
- goos: windows
format: zip
files:
- LICENSE
- README.md
checksum:
name_template: 'checksums.txt'
snapshot:
name_template: '{{ .Env.KOPIA_VERSION_NO_PREFIX }}'
nfpms:
- homepage: https://kopia.io
vendor: Kopia Project
maintainer: Kopia Project <kopia-pmc@googlegroups.com>
description: Fast and secure open source backup.
license: Apache 2.0
file_name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}"
replacements:
arm: armhf
formats:
- deb
- rpm
bindir: /usr/bin
overrides:
rpm:
file_name_template: "{{ .ProjectName }}-{{ .Version }}.{{ .Arch }}"
replacements:
amd64: x86_64
arm64: aarch64
arm: armhfp
signs:
- id: all
artifacts: checksum
cmd: tools/sign.sh
args: ["${artifact}", "${signature}"]
changelog:
filters:
exclude:
- '^docs:'
- '^test:'