forked from charmbracelet/crush
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.goreleaser.yml
More file actions
348 lines (324 loc) Β· 10.4 KB
/
.goreleaser.yml
File metadata and controls
348 lines (324 loc) Β· 10.4 KB
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
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
# yaml-language-server: $schema=https://goreleaser.com/static/schema-pro.json
# vim: set ts=2 sw=2 tw=0 fo=jcroql
version: 2
project_name: crush
includes:
- from_url:
url: charmbracelet/meta/main/notarize.yaml
metadata:
mod_timestamp: "{{ .CommitTimestamp }}"
license: "FSL-1.1-MIT"
homepage: "https://charm.sh/crush"
description: "A powerful terminal-based AI assistant for developers, providing intelligent coding assistance directly in your terminal."
full_description: "A powerful terminal-based AI assistant for developers, providing intelligent coding assistance directly in your terminal."
maintainers:
- "kujtimiihoxha <kujtim@charm.sh>"
- "caarlos0 <carlos@charm.sh>" # for aur
nightly:
publish_release: true
keep_single_release: true
version_template: "{{ incminor .Version }}-nightly"
snapshot:
version_template: "0.0.0-{{ .Timestamp }}"
before:
hooks:
- go mod tidy
- rm -rf completions
- mkdir completions
- rm -rf manpages
- mkdir manpages
- sh -c 'go run . completion bash >./completions/crush.bash'
- sh -c 'go run . completion zsh >./completions/crush.zsh'
- sh -c 'go run . completion fish >./completions/crush.fish'
- sh -c 'go run . man | gzip -c >./manpages/crush.1.gz'
# gomod:
# proxy: true
builds:
- env:
- CGO_ENABLED=0
- GOEXPERIMENT=greenteagc
goos:
- linux
- darwin
- windows
- freebsd
- openbsd
- netbsd
- android
goarch:
- amd64
- arm64
- "386"
- arm
goarm:
- "7"
ignore:
- goos: android
goarch: amd64
- goos: android
goarch: arm
- goos: android
goarch: "386"
- goos: windows
goarch: arm
ldflags:
- -s -w -X github.com/charmbracelet/crush/internal/version.Version={{.Version}}
flags:
- -trimpath
archives:
- name_template: >-
crush_
{{- .Version }}_
{{- title .Os }}_
{{- if eq .Arch "amd64" }}x86_64
{{- else if eq .Arch "386" }}i386
{{- else }}{{ .Arch }}{{ end }}
{{- with .Arm}}v{{ . }}{{ end }}
wrap_in_directory: true
files:
- README*
- LICENSE*
- manpages/*
- completions/*
format_overrides:
- goos: windows
formats: [zip]
checksum:
name_template: "checksums.txt"
aur_sources:
- private_key: "{{ .Env.AUR_KEY }}"
disable: "{{ with .Prerelease }}true{{ end }}"
git_url: "ssh://aur@aur.archlinux.org/crush.git"
commit_author:
name: "Charm"
email: "charmcli@users.noreply.github.com"
makedepends:
- go
- git
prepare: |-
go mod download
build: |-
mkdir completions
mkdir manpages
export CGO_CPPFLAGS="${CPPFLAGS}"
export CGO_CFLAGS="${CFLAGS}"
export CGO_CXXFLAGS="${CXXFLAGS}"
export CGO_LDFLAGS="${LDFLAGS}"
export GOFLAGS="-buildmode=pie -trimpath -mod=readonly -modcacherw"
go build -ldflags="-w -s -buildid='' -linkmode=external -X main.version=v${pkgver}" .
./crush completion bash >./completions/crush.bash
./crush completion zsh >./completions/crush.zsh
./crush completion fish >./completions/crush.fish
./crush man | gzip -c >./manpages/crush.1.gz
package: |-
# bin
install -Dm755 "./crush" "${pkgdir}/usr/bin/crush"
# license
mkdir -p "${pkgdir}/usr/share/licenses/crush/"
install -Dm644 ./LICENSE* "${pkgdir}/usr/share/licenses/crush/"
# completions
mkdir -p "${pkgdir}/usr/share/bash-completion/completions/"
mkdir -p "${pkgdir}/usr/share/zsh/site-functions/"
mkdir -p "${pkgdir}/usr/share/fish/vendor_completions.d/"
install -Dm644 "./completions/crush.bash" "${pkgdir}/usr/share/bash-completion/completions/crush"
install -Dm644 "./completions/crush.zsh" "${pkgdir}/usr/share/zsh/site-functions/_crush"
install -Dm644 "./completions/crush.fish" "${pkgdir}/usr/share/fish/vendor_completions.d/crush.fish"
# man pages
install -Dm644 "./manpages/crush.1.gz" "${pkgdir}/usr/share/man/man1/crush.1.gz"
# readme
mkdir -pv "${pkgdir}/usr/share/doc/crush/"
install -Dm644 README* "${pkgdir}/usr/share/doc/crush/"
aurs:
- private_key: "{{ .Env.AUR_KEY }}"
disable: "{{ with .Prerelease }}true{{ end }}"
git_url: "ssh://aur@aur.archlinux.org/crush-bin.git"
commit_author:
name: "Charm"
email: "charmcli@users.noreply.github.com"
provides:
- crush
conflicts:
- crush
package: |-
case "$CARCH" in
aarch64)
cd "${srcdir}/crush_${pkgver}_Linux_arm64"
;;
*)
cd "${srcdir}/crush_${pkgver}_Linux_${CARCH}"
;;
esac
# bin
install -Dm755 "./crush" "${pkgdir}/usr/bin/crush"
# license
mkdir -p "${pkgdir}/usr/share/licenses/crush/"
install -Dm644 ./LICENSE* "${pkgdir}/usr/share/licenses/crush/"
# completions
mkdir -p "${pkgdir}/usr/share/bash-completion/completions/"
mkdir -p "${pkgdir}/usr/share/zsh/site-functions/"
mkdir -p "${pkgdir}/usr/share/fish/vendor_completions.d/"
install -Dm644 "./completions/crush.bash" "${pkgdir}/usr/share/bash-completion/completions/crush"
install -Dm644 "./completions/crush.zsh" "${pkgdir}/usr/share/zsh/site-functions/_crush"
install -Dm644 "./completions/crush.fish" "${pkgdir}/usr/share/fish/vendor_completions.d/crush.fish"
# man pages
install -Dm644 "./manpages/crush.1.gz" "${pkgdir}/usr/share/man/man1/crush.1.gz"
# readme
mkdir -pv "${pkgdir}/usr/share/doc/crush/"
install -Dm644 README* "${pkgdir}/usr/share/doc/crush/"
furies:
- disable: "{{ if (or .Prerelease .IsNightly) }}true{{ end }}"
account: "{{ with .Env.FURY_TOKEN }}charmcli{{ else }}{{ end }}"
secret_name: FURY_TOKEN
brews:
- repository:
owner: charmbracelet
name: homebrew-tap
token: "{{ .Env.HOMEBREW_TAP_GITHUB_TOKEN }}"
skip_upload: "{{ with .Prerelease }}true{{ end }}"
commit_author:
name: "Charm"
email: "charmcli@users.noreply.github.com"
goarm: 7
extra_install: |-
bash_completion.install "completions/{{ .ProjectName }}.bash" => "{{ .ProjectName }}"
zsh_completion.install "completions/{{ .ProjectName }}.zsh" => "_{{ .ProjectName }}"
fish_completion.install "completions/{{ .ProjectName }}.fish"
man1.install "manpages/{{ .ProjectName }}.1.gz"
scoops:
- repository:
owner: charmbracelet
name: scoop-bucket
token: "{{ .Env.HOMEBREW_TAP_GITHUB_TOKEN }}"
skip_upload: "{{ with .Prerelease }}true{{ end }}"
commit_author:
name: "Charm"
email: "charmcli@users.noreply.github.com"
npms:
- name: "@charmland/crush"
repository: "git+https://github.com/charmbracelet/crush.git"
bugs: https://github.com/charmbracelet/crush/issues
access: public
disable: "{{ with .Prerelease }}true{{ end }}"
nfpms:
- formats:
- apk
- deb
- rpm
- archlinux
- termux.deb
file_name_template: "{{ .ConventionalFileName }}"
contents:
- src: ./completions/crush.bash
dst: '{{ if eq .Format "termux.deb" }}/data/data/com.termux/files/usr{{ end }}/etc/bash_completion.d/crush'
- src: ./completions/crush.fish
dst: '{{ if eq .Format "termux.deb" }}/data/data/com.termux/files{{ end }}/usr/share/fish/vendor_completions.d/crush.fish'
- src: ./completions/crush.zsh
dst: '{{ if eq .Format "termux.deb" }}/data/data/com.termux/files{{ end }}/usr/share/zsh/site-functions/_crush'
- src: ./manpages/crush.1.gz
dst: '{{ if eq .Format "termux.deb" }}/data/data/com.termux/files{{ end }}/usr/share/man/man1/crush.1.gz'
rpm:
signature:
key_file: '{{ if ne (index .Env "GPG_KEY_PATH") "" }}{{ .Env.GPG_KEY_PATH }}{{ else }}{{ end }}'
deb:
signature:
key_file: '{{ if ne (index .Env "GPG_KEY_PATH") "" }}{{ .Env.GPG_KEY_PATH }}{{ else }}{{ end }}'
signs:
- cmd: cosign
signature: "${artifact}.sigstore.json"
args:
- sign-blob
- "--bundle=${signature}"
- "${artifact}"
- "--yes"
artifacts: checksum
output: true
source:
enabled: true
sboms:
- artifacts: archive
- id: source
artifacts: source
nix:
- repository:
owner: "charmbracelet"
name: nur
token: "{{ .Env.HOMEBREW_TAP_GITHUB_TOKEN }}"
commit_author:
name: "Charm"
email: "charmcli@users.noreply.github.com"
license: fsl11Mit
skip_upload: "{{ with .Prerelease }}true{{ end }}"
extra_install: |-
installManPage ./manpages/crush.1.gz
installShellCompletion ./completions/*
winget:
- publisher: charmbracelet
copyright: Charmbracelet, Inc
publisher_url: https://charm.land
release_notes_url: "https://github.com/charmbracelet/crush/releases/tag/{{.Tag}}"
license_url: https://github.com/charmbracelet/crush/blob/main/LICENSE.md
skip_upload: "{{ with .Prerelease }}true{{ end }}"
commit_author:
name: "Charm"
email: "charmcli@users.noreply.github.com"
repository:
owner: "charmbracelet"
name: winget-pkgs
token: "{{ .Env.HOMEBREW_TAP_GITHUB_TOKEN }}"
branch: "crush-{{.Version}}"
pull_request:
enabled: true
draft: false
check_boxes: true
base:
owner: microsoft
name: winget-pkgs
branch: master
changelog:
sort: asc
disable: "{{ .IsNightly }}"
use: github
filters:
exclude:
- "^(build|ci): "
- "^chore: auto-update generated files$"
- "^chore: docs$"
- "^chore: schema update$"
- "^chore: schema$"
- "^chore: typo$"
- "^chore: update schema$"
- "^chore: update$"
- "^chore\\(legal\\): "
- "^chore\\(deps\\): "
- "^docs: update$"
- "^test:"
- "^test\\("
- "^v\\d.*"
- "merge conflict"
- "merge conflict"
- Merge branch
- Merge pull request
- Merge remote-tracking branch
- go mod tidy
- "^wip "
- "^wip:"
groups:
- title: "Deps"
regexp: "^.*\\(deps\\)*:+.*$"
order: 300
- title: "New!"
regexp: "^.*feat[(\\w)]*:+.*$"
order: 100
- title: "Fixed"
regexp: "^.*fix[(\\w)]*:+.*$"
order: 200
- title: "Docs"
regexp: "^.*docs[(\\w)]*:+.*$"
order: 400
- title: "Other stuff"
order: 9999
release:
prerelease: auto
footer:
from_url:
url: https://raw.githubusercontent.com/charmbracelet/meta/main/footer.md