1# yaml-language-server: $schema=https://goreleaser.com/static/schema-pro.json
2# vim: set ts=2 sw=2 tw=0 fo=jcroql
3version: 2
4
5project_name: crush
6
7includes:
8 - from_url:
9 url: charmbracelet/meta/main/notarize.yaml
10
11metadata:
12 mod_timestamp: "{{ .CommitTimestamp }}"
13 license: "FSL-1.1-MIT"
14 homepage: "https://charm.sh/crush"
15 description: "A powerful terminal-based AI assistant for developers, providing intelligent coding assistance directly in your terminal."
16 full_description: "A powerful terminal-based AI assistant for developers, providing intelligent coding assistance directly in your terminal."
17 maintainers:
18 - "kujtimiihoxha <kujtim@charm.sh>"
19 - "caarlos0 <carlos@charm.sh>" # for aur
20
21nightly:
22 publish_release: true
23 keep_single_release: true
24 version_template: "{{ incminor .Version }}-nightly"
25
26snapshot:
27 version_template: "0.0.0-{{ .Timestamp }}"
28
29before:
30 hooks:
31 - go mod tidy
32 - rm -rf completions
33 - mkdir completions
34 - rm -rf manpages
35 - mkdir manpages
36 - sh -c 'go run . completion bash >./completions/crush.bash'
37 - sh -c 'go run . completion zsh >./completions/crush.zsh'
38 - sh -c 'go run . completion fish >./completions/crush.fish'
39 - sh -c 'go run . man | gzip -c >./manpages/crush.1.gz'
40
41# gomod:
42# proxy: true
43
44builds:
45 - env:
46 - CGO_ENABLED=0
47 - GOEXPERIMENT=greenteagc
48 goos:
49 - linux
50 - darwin
51 - windows
52 - freebsd
53 - openbsd
54 - netbsd
55 - android
56 goarch:
57 - amd64
58 - arm64
59 - "386"
60 - arm
61 goarm:
62 - "7"
63 ignore:
64 - goos: android
65 goarch: amd64
66 - goos: android
67 goarch: arm
68 - goos: android
69 goarch: "386"
70 - goos: windows
71 goarch: arm
72 ldflags:
73 - -s -w -X github.com/charmbracelet/crush/internal/version.Version={{.Version}}
74 flags:
75 - -trimpath
76
77archives:
78 - name_template: >-
79 crush_
80 {{- .Version }}_
81 {{- title .Os }}_
82 {{- if eq .Arch "amd64" }}x86_64
83 {{- else if eq .Arch "386" }}i386
84 {{- else }}{{ .Arch }}{{ end }}
85 {{- with .Arm}}v{{ . }}{{ end }}
86 wrap_in_directory: true
87 files:
88 - README*
89 - LICENSE*
90 - manpages/*
91 - completions/*
92 format_overrides:
93 - goos: windows
94 formats: [zip]
95
96checksum:
97 name_template: "checksums.txt"
98
99aur_sources:
100 - private_key: "{{ .Env.AUR_KEY }}"
101 disable: "{{ with .Prerelease }}true{{ end }}"
102 git_url: "ssh://aur@aur.archlinux.org/crush.git"
103 commit_author:
104 name: "Charm"
105 email: "charmcli@users.noreply.github.com"
106 makedepends:
107 - go
108 - git
109 prepare: |-
110 go mod download
111 build: |-
112 mkdir completions
113 mkdir manpages
114 export CGO_CPPFLAGS="${CPPFLAGS}"
115 export CGO_CFLAGS="${CFLAGS}"
116 export CGO_CXXFLAGS="${CXXFLAGS}"
117 export CGO_LDFLAGS="${LDFLAGS}"
118 export GOFLAGS="-buildmode=pie -trimpath -mod=readonly -modcacherw"
119 go build -ldflags="-w -s -buildid='' -linkmode=external -X github.com/charmbracelet/crush/internal/version.Version=v${pkgver}" .
120 ./crush completion bash >./completions/crush.bash
121 ./crush completion zsh >./completions/crush.zsh
122 ./crush completion fish >./completions/crush.fish
123 ./crush man | gzip -c >./manpages/crush.1.gz
124 package: |-
125 # bin
126 install -Dm755 "./crush" "${pkgdir}/usr/bin/crush"
127 # license
128 mkdir -p "${pkgdir}/usr/share/licenses/crush/"
129 install -Dm644 ./LICENSE* "${pkgdir}/usr/share/licenses/crush/"
130 # completions
131 mkdir -p "${pkgdir}/usr/share/bash-completion/completions/"
132 mkdir -p "${pkgdir}/usr/share/zsh/site-functions/"
133 mkdir -p "${pkgdir}/usr/share/fish/vendor_completions.d/"
134 install -Dm644 "./completions/crush.bash" "${pkgdir}/usr/share/bash-completion/completions/crush"
135 install -Dm644 "./completions/crush.zsh" "${pkgdir}/usr/share/zsh/site-functions/_crush"
136 install -Dm644 "./completions/crush.fish" "${pkgdir}/usr/share/fish/vendor_completions.d/crush.fish"
137 # man pages
138 install -Dm644 "./manpages/crush.1.gz" "${pkgdir}/usr/share/man/man1/crush.1.gz"
139 # readme
140 mkdir -pv "${pkgdir}/usr/share/doc/crush/"
141 install -Dm644 README* "${pkgdir}/usr/share/doc/crush/"
142
143aurs:
144 - private_key: "{{ .Env.AUR_KEY }}"
145 disable: "{{ with .Prerelease }}true{{ end }}"
146 git_url: "ssh://aur@aur.archlinux.org/crush-bin.git"
147 commit_author:
148 name: "Charm"
149 email: "charmcli@users.noreply.github.com"
150 provides:
151 - crush
152 conflicts:
153 - crush
154 package: |-
155 case "$CARCH" in
156 aarch64)
157 cd "${srcdir}/crush_${pkgver}_Linux_arm64"
158 ;;
159 *)
160 cd "${srcdir}/crush_${pkgver}_Linux_${CARCH}"
161 ;;
162 esac
163 # bin
164 install -Dm755 "./crush" "${pkgdir}/usr/bin/crush"
165 # license
166 mkdir -p "${pkgdir}/usr/share/licenses/crush/"
167 install -Dm644 ./LICENSE* "${pkgdir}/usr/share/licenses/crush/"
168 # completions
169 mkdir -p "${pkgdir}/usr/share/bash-completion/completions/"
170 mkdir -p "${pkgdir}/usr/share/zsh/site-functions/"
171 mkdir -p "${pkgdir}/usr/share/fish/vendor_completions.d/"
172 install -Dm644 "./completions/crush.bash" "${pkgdir}/usr/share/bash-completion/completions/crush"
173 install -Dm644 "./completions/crush.zsh" "${pkgdir}/usr/share/zsh/site-functions/_crush"
174 install -Dm644 "./completions/crush.fish" "${pkgdir}/usr/share/fish/vendor_completions.d/crush.fish"
175 # man pages
176 install -Dm644 "./manpages/crush.1.gz" "${pkgdir}/usr/share/man/man1/crush.1.gz"
177 # readme
178 mkdir -pv "${pkgdir}/usr/share/doc/crush/"
179 install -Dm644 README* "${pkgdir}/usr/share/doc/crush/"
180
181furies:
182 - disable: "{{ if (or .Prerelease .IsNightly) }}true{{ end }}"
183 account: "{{ with .Env.FURY_TOKEN }}charmcli{{ else }}{{ end }}"
184 secret_name: FURY_TOKEN
185
186brews:
187 - repository:
188 owner: charmbracelet
189 name: homebrew-tap
190 token: "{{ .Env.HOMEBREW_TAP_GITHUB_TOKEN }}"
191 skip_upload: "{{ with .Prerelease }}true{{ end }}"
192 commit_author:
193 name: "Charm"
194 email: "charmcli@users.noreply.github.com"
195 goarm: 7
196 extra_install: |-
197 bash_completion.install "completions/{{ .ProjectName }}.bash" => "{{ .ProjectName }}"
198 zsh_completion.install "completions/{{ .ProjectName }}.zsh" => "_{{ .ProjectName }}"
199 fish_completion.install "completions/{{ .ProjectName }}.fish"
200 man1.install "manpages/{{ .ProjectName }}.1.gz"
201
202scoops:
203 - repository:
204 owner: charmbracelet
205 name: scoop-bucket
206 token: "{{ .Env.HOMEBREW_TAP_GITHUB_TOKEN }}"
207 skip_upload: "{{ with .Prerelease }}true{{ end }}"
208 commit_author:
209 name: "Charm"
210 email: "charmcli@users.noreply.github.com"
211
212npms:
213 - name: "@charmland/crush"
214 repository: "git+https://github.com/charmbracelet/crush.git"
215 bugs: https://github.com/charmbracelet/crush/issues
216 access: public
217 disable: "{{ with .Prerelease }}true{{ end }}"
218
219nfpms:
220 - formats:
221 - apk
222 - deb
223 - rpm
224 - archlinux
225 - termux.deb
226 file_name_template: "{{ .ConventionalFileName }}"
227 contents:
228 - src: ./completions/crush.bash
229 dst: '{{ if eq .Format "termux.deb" }}/data/data/com.termux/files/usr{{ end }}/etc/bash_completion.d/crush'
230 - src: ./completions/crush.fish
231 dst: '{{ if eq .Format "termux.deb" }}/data/data/com.termux/files{{ end }}/usr/share/fish/vendor_completions.d/crush.fish'
232 - src: ./completions/crush.zsh
233 dst: '{{ if eq .Format "termux.deb" }}/data/data/com.termux/files{{ end }}/usr/share/zsh/site-functions/_crush'
234 - src: ./manpages/crush.1.gz
235 dst: '{{ if eq .Format "termux.deb" }}/data/data/com.termux/files{{ end }}/usr/share/man/man1/crush.1.gz'
236 rpm:
237 signature:
238 key_file: '{{ if ne (index .Env "GPG_KEY_PATH") "" }}{{ .Env.GPG_KEY_PATH }}{{ else }}{{ end }}'
239 deb:
240 signature:
241 key_file: '{{ if ne (index .Env "GPG_KEY_PATH") "" }}{{ .Env.GPG_KEY_PATH }}{{ else }}{{ end }}'
242
243signs:
244 - cmd: cosign
245 signature: "${artifact}.sigstore.json"
246 args:
247 - sign-blob
248 - "--bundle=${signature}"
249 - "${artifact}"
250 - "--yes"
251 artifacts: checksum
252 output: true
253
254source:
255 enabled: true
256
257sboms:
258 - artifacts: archive
259 - id: source
260 artifacts: source
261
262nix:
263 - repository:
264 owner: "charmbracelet"
265 name: nur
266 token: "{{ .Env.HOMEBREW_TAP_GITHUB_TOKEN }}"
267 commit_author:
268 name: "Charm"
269 email: "charmcli@users.noreply.github.com"
270 license: fsl11Mit
271 formatter: nixfmt
272 skip_upload: "{{ with .Prerelease }}true{{ end }}"
273 extra_install: |-
274 installManPage ./manpages/crush.1.gz
275 installShellCompletion ./completions/*
276
277winget:
278 - publisher: charmbracelet
279 copyright: Charmbracelet, Inc
280 publisher_url: https://charm.land
281 release_notes_url: "https://github.com/charmbracelet/crush/releases/tag/{{.Tag}}"
282 license_url: https://github.com/charmbracelet/crush/blob/main/LICENSE.md
283 skip_upload: "{{ with .Prerelease }}true{{ end }}"
284 commit_author:
285 name: "Charm"
286 email: "charmcli@users.noreply.github.com"
287 repository:
288 owner: "charmbracelet"
289 name: winget-pkgs
290 token: "{{ .Env.HOMEBREW_TAP_GITHUB_TOKEN }}"
291 branch: "crush-{{.Version}}"
292 pull_request:
293 enabled: true
294 draft: false
295 check_boxes: true
296 base:
297 owner: microsoft
298 name: winget-pkgs
299 branch: master
300 body: |
301 /cc @andreynering
302
303changelog:
304 sort: asc
305 disable: "{{ .IsNightly }}"
306 use: github
307 filters:
308 exclude:
309 - "^(build|ci): "
310 - "^chore: auto-update generated files$"
311 - "^chore: docs$"
312 - "^chore: schema update$"
313 - "^chore: schema$"
314 - "^chore: typo$"
315 - "^chore: update schema$"
316 - "^chore: update$"
317 - "^chore\\(legal\\): "
318 - "^chore\\(deps\\): "
319 - "^docs: update$"
320 - "^test:"
321 - "^test\\("
322 - "^v\\d.*"
323 - "merge conflict"
324 - "merge conflict"
325 - Merge branch
326 - Merge pull request
327 - Merge remote-tracking branch
328 - go mod tidy
329 - "^wip "
330 - "^wip:"
331 groups:
332 - title: "Deps"
333 regexp: "^.*\\(deps\\)*:+.*$"
334 order: 300
335 - title: "New!"
336 regexp: "^.*feat[(\\w)]*:+.*$"
337 order: 100
338 - title: "Fixed"
339 regexp: "^.*fix[(\\w)]*:+.*$"
340 order: 200
341 - title: "Docs"
342 regexp: "^.*docs[(\\w)]*:+.*$"
343 order: 400
344 - title: "Other stuff"
345 order: 9999
346
347release:
348 prerelease: auto
349 footer:
350 from_url:
351 url: https://raw.githubusercontent.com/charmbracelet/meta/main/footer.md