-
Notifications
You must be signed in to change notification settings - Fork 56
/
.goreleaser.yml
125 lines (125 loc) · 3.56 KB
/
.goreleaser.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
env:
# Disable CGO for now. This means binaries won't be able to run
# "infra server" until we enable CGO at a later time.
# TODO (https://github.com/infrahq/infra/issues/65)
- CGO_ENABLED=0
- GO111MODULE=on
project_name: infra
builds:
- id: infra
ldflags:
- -s
- -w
- -X github.com/infrahq/infra/internal.Branch={{ .Branch }}
- -X github.com/infrahq/infra/internal.Version={{ .Version }}
- -X github.com/infrahq/infra/internal.Commit={{ .FullCommit }}
- -X github.com/infrahq/infra/internal.Date={{ .Date }}
binary: infra
main: ./main.go
goos:
- darwin
- windows
- linux
goarch:
- amd64
- arm64
ignore:
- goos: windows
goarch: arm64
nfpms:
- id: packages
package_name: infra
file_name_template: "{{ .ConventionalFileName }}"
builds:
- infra
vendor: Infra Technologies, Inc.
homepage: https://infrahq.com
maintainer: Infra Technologies, Inc. <contact@infrahq.com>
license: Elastic License v2.0
formats:
- deb
- rpm
bindir: /usr/local/sbin
contents:
- src: package-files/systemd/infra.service
dst: /lib/systemd/system/infra.service
type: config
- src: package-files/connector.example.yaml
dst: /etc/infra/connector.example.yaml
type: config
- src: package-files/selinux/infra.pp
dst: /usr/share/infra/selinux/infra.pp
type: config
packager: rpm
scripts:
preinstall: package-files/preinstall.sh
postinstall: package-files/postinstall.sh
preremove: package-files/preremove.sh
overrides:
deb:
dependencies:
- passwd
- procps
suggests:
- openssh-client
- openssh-server
rpm:
dependencies:
- shadow-utils
- procps-ng
suggests:
- openssh-clients
- openssh-server
archives:
- id: zip
format: zip
replacements:
amd64: x86_64
files:
- none*
brews:
- tap:
owner: infrahq
name: homebrew-tap
commit_author:
name: infra-ci
email: contact@infrahq.com
homepage: https://infrahq.com
description: Infra
url_template: "https://github.com/infrahq/infra/releases/download/{{ .Tag }}/{{ .ArtifactName }}"
install: |
bin.install "infra"
output = Utils.popen_read("#{bin}/infra completion bash")
(bash_completion/"infra").write output
output = Utils.popen_read("#{bin}/infra completion zsh")
(zsh_completion/"_infra").write output
output = Utils.popen_read("#{bin}/infra completion fish")
(fish_completion/"infra.fish").write output
scoop:
bucket:
owner: infrahq
name: scoop
commit_author:
name: infra-ci
email: contact@infrahq.com
homepage: https://infrahq.com
description: Infra
url_template: "https://github.com/infrahq/infra/releases/download/{{ .Tag }}/{{ .ArtifactName }}"
publishers:
- name: gemfury
ids: [packages]
dir: "{{ dir .ArtifactPath }}"
cmd: curl -F package=@{{ .ArtifactName }} https://{{ .Env.GEMFURY_TOKEN }}@push.fury.io/infrahq/
checksum:
name_template: "{{ .ProjectName }}-checksums.txt"
snapshot:
name_template: "{{ .Env.RELEASE_NAME }}"
before:
hooks:
- sh -c '
command -v checkmodule >/dev/null
&& command -v semodule_package >/dev/null
&& checkmodule -M -m -o package-files/selinux/infra.mod package-files/selinux/infra.te
&& semodule_package -o package-files/selinux/infra.pp -m package-files/selinux/infra.mod
|| true
'