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