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