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 main.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 skip_upload: "{{ with .Prerelease }}true{{ end }}"
272 extra_install: |-
273 installManPage ./manpages/crush.1.gz
274 installShellCompletion ./completions/*
275
276winget:
277 - publisher: charmbracelet
278 copyright: Charmbracelet, Inc
279 publisher_url: https://charm.land
280 release_notes_url: "https://github.com/charmbracelet/crush/releases/tag/{{.Tag}}"
281 license_url: https://github.com/charmbracelet/crush/blob/main/LICENSE.md
282 skip_upload: "{{ with .Prerelease }}true{{ end }}"
283 commit_author:
284 name: "Charm"
285 email: "charmcli@users.noreply.github.com"
286 repository:
287 owner: "charmbracelet"
288 name: winget-pkgs
289 token: "{{ .Env.HOMEBREW_TAP_GITHUB_TOKEN }}"
290 branch: "crush-{{.Version}}"
291 pull_request:
292 enabled: true
293 draft: false
294 check_boxes: true
295 base:
296 owner: microsoft
297 name: winget-pkgs
298 branch: master
299
300changelog:
301 sort: asc
302 disable: "{{ .IsNightly }}"
303 use: github
304 filters:
305 exclude:
306 - "^(build|ci): "
307 - "^chore: auto-update generated files$"
308 - "^chore: docs$"
309 - "^chore: schema update$"
310 - "^chore: schema$"
311 - "^chore: typo$"
312 - "^chore: update schema$"
313 - "^chore: update$"
314 - "^chore\\(legal\\): "
315 - "^chore\\(deps\\): "
316 - "^docs: update$"
317 - "^test:"
318 - "^test\\("
319 - "^v\\d.*"
320 - "merge conflict"
321 - "merge conflict"
322 - Merge branch
323 - Merge pull request
324 - Merge remote-tracking branch
325 - go mod tidy
326 - "^wip "
327 - "^wip:"
328 groups:
329 - title: "Deps"
330 regexp: "^.*\\(deps\\)*:+.*$"
331 order: 300
332 - title: "New!"
333 regexp: "^.*feat[(\\w)]*:+.*$"
334 order: 100
335 - title: "Fixed"
336 regexp: "^.*fix[(\\w)]*:+.*$"
337 order: 200
338 - title: "Docs"
339 regexp: "^.*docs[(\\w)]*:+.*$"
340 order: 400
341 - title: "Other stuff"
342 order: 9999
343
344release:
345 prerelease: auto
346 footer:
347 from_url:
348 url: https://raw.githubusercontent.com/charmbracelet/meta/main/footer.md