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
169scoops:
170 - repository:
171 owner: charmbracelet
172 name: scoop-bucket
173 token: "{{ .Env.HOMEBREW_TAP_GITHUB_TOKEN }}"
174
175npms:
176 - name: "@charmland/crush"
177 repository: "git+https://github.com/charmbracelet/crush.git"
178 bugs: https://github.com/charmbracelet/crush/issues
179 access: public
180
181nfpms:
182 - formats:
183 - apk
184 - deb
185 - rpm
186 - archlinux
187 file_name_template: "{{ .ConventionalFileName }}"
188 contents:
189 - src: ./completions/crush.bash
190 dst: /etc/bash_completion.d/crush
191 - src: ./completions/crush.fish
192 dst: /usr/share/fish/vendor_completions.d/crush.fish
193 - src: ./completions/crush.zsh
194 dst: /usr/share/zsh/site-functions/_crush
195 - src: ./manpages/crush.1.gz
196 dst: /usr/share/man/man1/crush.1.gz
197 rpm:
198 signature:
199 key_file: '{{ if ne (index .Env "GPG_KEY_PATH") "" }}{{ .Env.GPG_KEY_PATH }}{{ else }}{{ end }}'
200 deb:
201 signature:
202 key_file: '{{ if ne (index .Env "GPG_KEY_PATH") "" }}{{ .Env.GPG_KEY_PATH }}{{ else }}{{ end }}'
203
204signs:
205 - cmd: cosign
206 certificate: "${artifact}.pem"
207 args:
208 - sign-blob
209 - "--output-certificate=${certificate}"
210 - "--output-signature=${signature}"
211 - "${artifact}"
212 - "--yes"
213 artifacts: checksum
214 output: true
215
216source:
217 enabled: true
218
219sboms:
220 - artifacts: archive
221 - id: source
222 artifacts: source
223
224nix:
225 - repository:
226 owner: "charmbracelet"
227 name: nur
228 token: "{{ .Env.HOMEBREW_TAP_GITHUB_TOKEN }}"
229 license: fsl11Mit
230 extra_install: |-
231 installManPage ./manpages/crush.1.gz
232 installShellCompletion ./completions/*
233
234winget:
235 - publisher: charmbracelet
236 copyright: Charmbracelet, Inc
237 repository:
238 owner: "charmbracelet"
239 name: winget-pkgs
240 token: "{{ .Env.HOMEBREW_TAP_GITHUB_TOKEN }}"
241 branch: "crush-{{.Version}}"
242 pull_request:
243 enabled: true
244 draft: false
245 check_boxes: true
246 base:
247 owner: microsoft
248 name: winget-pkgs
249 branch: master
250
251changelog:
252 sort: asc
253 disable: "{{ .IsNightly }}"
254 use: github
255 filters:
256 exclude:
257 - "^(build|ci): "
258 - "^chore: auto-update generated files$"
259 - "^chore: docs$"
260 - "^chore: schema update$"
261 - "^chore: schema$"
262 - "^chore: typo$"
263 - "^chore: update schema$"
264 - "^chore: update$"
265 - "^chore\\(legal\\): "
266 - "^chore\\(deps\\): "
267 - "^docs: update$"
268 - "^test:"
269 - "^test\\("
270 - "merge conflict"
271 - "merge conflict"
272 - Merge branch
273 - Merge pull request
274 - Merge remote-tracking branch
275 - go mod tidy
276 - "^wip "
277 - "^wip:"
278 groups:
279 - title: "New Features"
280 regexp: '^.*?feat(\(.+\))??!?:.+$'
281 order: 100
282 - title: "Security updates"
283 regexp: '^.*?sec(\(.+\))??!?:.+$'
284 order: 150
285 - title: "Bug fixes and improvements"
286 regexp: '^.*?(fix|refactor)(\(.+\))??!?:.+$'
287 order: 200
288 - title: "Documentation updates"
289 regexp: ^.*?docs?(\(.+\))??!?:.+$
290 order: 400
291 - title: Other work
292 order: 9999
293
294release:
295 prerelease: auto
296 footer:
297 from_url:
298 url: https://raw.githubusercontent.com/charmbracelet/meta/main/footer.md