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