-
Notifications
You must be signed in to change notification settings - Fork 14
/
.goreleaser.yml
131 lines (121 loc) · 3.6 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
126
127
128
129
130
131
before:
hooks:
- /bin/sh -c "printf {{.Version }} > gosmee/templates/version"
builds:
- env:
- CGO_ENABLED=0
main: ./
binary: gosmee
goos:
- linux
- darwin
- windows
goarch:
- amd64
- arm64
- s390x
- ppc64le
ldflags:
- -w
- -s
archives:
- name_template: >-
{{ .Binary }}_
{{- .Version }}_
{{- .Os }}_
{{- if eq .Arch "amd64" }}x86_64
{{- else if eq .Arch "386" }}i386
{{- else if eq .Arch "darwin" }}MacOS
{{- else if eq .Arch "linux" }}Linux
{{- else if eq .Arch "windows" }}Windows
{{- else }}{{ .Arch }}{{ end }}
format_overrides:
- goos: windows
format: zip
brews:
- name: gosmee
repository:
owner: chmouel
name: gosmee
directory: Formula
homepage: "https://github.com/chmouel/gosmee"
description: "gosmee - A webhook and https://smee.io forwarder"
install: |
bin.install "gosmee" => "gosmee"
output = Utils.popen_read("SHELL=bash #{bin}/gosmee completion bash")
(bash_completion/"gosmee").write output
output = Utils.popen_read("SHELL=zsh #{bin}/gosmee completion zsh")
(zsh_completion/"_gosmee").write output
output = Utils.popen_read("SHELL=zsh #{bin}/gosmee completion fish")
(fish_completion/"gosmee.fish").write output
prefix.install_metafiles
checksum:
name_template: "checksums.txt"
snapshot:
name_template: "{{ .Tag }}-next"
release:
prerelease: "false"
nfpms:
- file_name_template: >-
gosmee-
{{- .Version}}_{{.Os}}-
{{- if eq .Arch "amd64" }}x86_64
{{- else if eq .Arch "386" }}i386
{{- else if eq .Arch "darwin" }}MacOS
{{- else if eq .Arch "linux" }}Linux
{{- else if eq .Arch "windows" }}Windows
{{- else }}{{ .Arch }}{{ end }}
homepage: https://github.com/chmouel/gosmee
description: "gosmee - A webhook and https://smee.io forwarder"
maintainer: Chmouel Boudjnah <[email protected]>
license: Apache 2.0
formats:
- apk
- deb
- rpm
bindir: /usr/bin
contents:
- src: ./misc/gosmee-server.service
dst: /etc/systemd/system/gosmee-server.service
type: "config|noreplace"
- src: ./misc/gosmee.service
dst: /etc/systemd/system/gosmee-client.service
type: "config|noreplace"
changelog:
sort: asc
use: github
filters:
exclude:
- "^docs:"
- "^test:"
- "^Brew formula update"
- Merge pull request
- Merge branch
- go mod tidy
- Update README.md
universal_binaries:
- replace: true
name_template: "gosmee"
aurs:
- name: gosmee-bin
homepage: "https://github.com/chmouel/gosmee"
description: "gosmee - A webhook and https://smee.io forwarder"
maintainers:
- "Chmouel Boudjnah <[email protected]>"
license: Apache 2.0
private_key: "{{ .Env.AUR_PRIVATE_KEY }}"
git_url: ssh://[email protected]/gosmee-bin.git
package: |-
# bin
install -Dm755 "./gosmee" "${pkgdir}/usr/bin/gosmee"
# license
install -Dm644 "./LICENSE" "${pkgdir}/usr/share/licenses/gosmee/LICENSE"
# completions
mkdir -p "${pkgdir}/usr/share/bash-completion/completions/"
mkdir -p "${pkgdir}/usr/share/zsh/site-functions/"
for i in zsh bash fish;do
./gosmee completion ${i} > gosmee.${i}
done
install -Dm644 "gosmee.fish" "${pkgdir}/usr/share/fish/vendor_completions.d/gosmee"
install -Dm644 "gosmee.bash" "${pkgdir}/usr/share/bash-completion/completions/gosmee"
install -Dm644 "gosmee.zsh" "${pkgdir}/usr/share/zsh/site-functions/_gosmee"