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