emissary/.goreleaser.yaml

138 lines
3.8 KiB
YAML
Raw Permalink Normal View History

2023-02-02 10:55:24 +01:00
project_name: emissary
before:
hooks:
- go mod tidy
builds:
- id: emissary-server
env:
- CGO_ENABLED=0
ldflags:
- -s
- -w
- -X 'main.GitRef={{ .Commit }}'
- -X 'main.ProjectVersion={{ .Version }}'
- -X 'main.BuildDate={{ .Date }}'
- -X 'main.DefaultConfigPath=/etc/emissary/server.yml'
gcflags:
- -trimpath="${PWD}"
asmflags:
- -trimpath="${PWD}"
goos:
- linux
- windows
- darwin
goarch:
- amd64
- arm64
main: ./cmd/server
- id: emissary-agent
env:
- CGO_ENABLED=0
ldflags:
- -s
- -w
- -X 'main.GitRef={{ .Commit }}'
- -X 'main.ProjectVersion={{ .Version }}'
- -X 'main.BuildDate={{ .Date }}'
- -X 'main.DefaultConfigPath=/etc/emissary/agent.yml'
gcflags:
- -trimpath="${PWD}"
asmflags:
- -trimpath="${PWD}"
goos:
- linux
- windows
- darwin
goarch:
- amd64
- arm64
- arm
main: ./cmd/agent
archives:
- id: server
builds: ["emissary-server"]
name_template: '{{ .ProjectName }}-server_{{ .Version }}_{{ .Os }}_{{ .Arch }}{{ with .Arm }}v{{ . }}{{ end }}{{ with .Mips }}_{{ . }}{{ end }}{{ if not (eq .Amd64 "v1") }}{{ .Amd64 }}{{ end }}'
files:
- README.md
- CHANGELOG.md
- migrations
- id: agent
builds: ["emissary-agent"]
name_template: '{{ .ProjectName }}-agent_{{ .Version }}_{{ .Os }}_{{ .Arch }}{{ with .Arm }}v{{ . }}{{ end }}{{ with .Mips }}_{{ . }}{{ end }}{{ if not (eq .Amd64 "v1") }}{{ .Amd64 }}{{ end }}'
files:
- README.md
- CHANGELOG.md
checksum:
name_template: 'checksums.txt'
snapshot:
name_template: "{{ incpatch .Version }}-next"
changelog:
sort: asc
filters:
exclude:
- '^docs:'
- '^test:'
nfpms:
- id: emissary-server
builds:
- "emissary-server"
package_name: emissary-server
homepage: https://forge.cadoles.com/Cadoles/emissary
maintainer: William Petit <william.petit@ptitcloud.fr>
description: |-
Control plane for edge devices (server).
license: AGPL-3.0
formats:
- apk
- deb
- rpm
contents:
- src: misc/packaging/common/config-server.yml
dst: /etc/emissary/server.yml
type: config
- src: migrations
dst: /usr/share/emissary/migrations
- src: misc/packaging/systemd/emissary-server.systemd.service
dst: /usr/lib/systemd/system/emissary-server.service
packager: deb
- src: misc/packaging/systemd/emissary-server.systemd.service
dst: /usr/lib/systemd/system/emissary-server.service
packager: rpm
- src: misc/packaging/openrc/emissary-server.openrc.sh
dst: /etc/init.d/emissary-server
file_info:
mode: 0755
packager: apk
scripts:
postinstall: "misc/packaging/common/postinstall-server.sh"
- id: emissary-agent
builds:
- "emissary-server"
package_name: emissary-agent
homepage: https://forge.cadoles.com/Cadoles/emissary
maintainer: William Petit <william.petit@ptitcloud.fr>
description: |-
Control plane for edge devices (agent).
license: AGPL-3.0
formats:
- apk
- deb
- rpm
contents:
- src: misc/packaging/common/config-agent.yml
dst: /etc/emissary/agent.yml
type: config
- src: misc/packaging/systemd/emissary-agent.systemd.service
dst: /usr/lib/systemd/system/emissary-agent.service
packager: deb
- src: misc/packaging/systemd/emissary-agent.systemd.service
dst: /usr/lib/systemd/system/emissary-agent.service
packager: rpm
- src: misc/packaging/openrc/emissary-agent.openrc.sh
dst: /etc/init.d/emissary-agent
file_info:
mode: 0755
packager: apk
scripts:
postinstall: "misc/packaging/common/postinstall-agent.sh"