on main help sign in
Merge pull request #44 from charmbracelet/goreleaser

ci: update goreleaser config

commit8dbabeadfcb4d2502a8d22c4c1a645024b83901c authorRaphael Amorim <rapha850@gmail.com> dateFri 20 Jun 2025, 16:58 (1 year ago) parentd6568021db31b3
2 files changed+32−67
.goreleaser.yml+32−24 scripts/release−43
.goreleaser.yml+32−24
@@ -1,24 +1,35 @@
1+# yaml-language-server: $schema=https://goreleaser.com/static/schema-pro.json
2+# vim: set ts=2 sw=2 tw=0 fo=jcroql
13version: 2
2−project_name: opencode
3−before:
4− hooks:
4+
5+project_name: crush
6+
7+metadata:
8+ mod_timestamp: "{{ .CommitTimestamp }}"
9+ license: "MIT"
10+ homepage: "https://charm.sh/crush"
11+ description: "A powerful terminal-based AI assistant for developers, providing intelligent coding assistance directly in your terminal."
12+ maintainers:
13+ - "kujtimiihoxha <kujtim@charm.sh>"
14+
515builds:
616 - env:
717 - CGO_ENABLED=0
818 goos:
919 - linux
1020 - darwin
21+ - windows
1122 goarch:
1223 - amd64
1324 - arm64
1425 ldflags:
15− - -s -w -X github.com/opencode-ai/opencode/internal/version.Version={{.Version}}
26+ - -s -w -X github.com/charmbracelet/crush/internal/version.Version={{.Version}}
1627 main: ./main.go
1728
1829archives:
19− - format: tar.gz
30+ - formats: [tar.gz]
2031 name_template: >-
21− opencode-
32+ crush-
2233 {{- if eq .Os "darwin" }}mac-
2334 {{- else if eq .Os "windows" }}windows-
2435 {{- else if eq .Os "linux" }}linux-{{end}}
@@ -28,34 +39,31 @@ archives:
2839 {{- if .Arm }}v{{ .Arm }}{{ end }}
2940 format_overrides:
3041 - goos: windows
31− format: zip
42+ formats: [zip]
43+
3244checksum:
3345 name_template: "checksums.txt"
46+
3447snapshot:
35− name_template: "0.0.0-{{ .Timestamp }}"
48+ version_template: "0.0.0-{{ .Timestamp }}"
49+
3650aurs:
37− - name: opencode-ai
38− homepage: "https://github.com/opencode-ai/opencode"
39− description: "terminal based agent that can build anything"
40− maintainers:
41− - "kujtimiihoxha <kujtimii.h@gmail.com>"
42− license: "MIT"
43− private_key: "{{ .Env.AUR_KEY }}"
44− git_url: "ssh://aur@aur.archlinux.org/opencode-ai-bin.git"
51+ - private_key: "{{ .Env.AUR_KEY }}"
52+ git_url: "ssh://aur@aur.archlinux.org/charmbracelet-bin.git"
4553 provides:
46− - opencode
54+ - crush
4755 conflicts:
48− - opencode
56+ - crush
4957 package: |-
50− install -Dm755 ./opencode "${pkgdir}/usr/bin/opencode"
51−brews:
58+ install -Dm755 ./crush "${pkgdir}/usr/bin/crush"
59+
60+homebrew_casks:
5261 - repository:
53− owner: opencode-ai
62+ owner: charmbracelet
5463 name: homebrew-tap
64+
5565nfpms:
56− - maintainer: kujtimiihoxha
57− description: terminal based agent that can build anything
58− formats:
66+ - formats:
5967 - deb
6068 - rpm
6169 file_name_template: >-
scripts/releasedeleted−43
@@ -1,43 +0,0 @@
1−#!/usr/bin/env bash
2−
3−# Parse command line arguments
4−minor=false
5−while [ "$#" -gt 0 ]; do
6− case "$1" in
7− --minor) minor=true; shift 1;;
8− *) echo "Unknown parameter: $1"; exit 1;;
9− esac
10−done
11−
12−git fetch --force --tags
13−
14−# Get the latest Git tag
15−latest_tag=$(git tag --sort=committerdate | grep -E '[0-9]' | tail -1)
16−
17−# If there is no tag, exit the script
18−if [ -z "$latest_tag" ]; then
19− echo "No tags found"
20− exit 1
21−fi
22−
23−echo "Latest tag: $latest_tag"
24−
25−# Split the tag into major, minor, and patch numbers
26−IFS='.' read -ra VERSION <<< "$latest_tag"
27−
28−if [ "$minor" = true ]; then
29− # Increment the minor version and reset patch to 0
30− minor_number=${VERSION[1]}
31− let "minor_number++"
32− new_version="${VERSION[0]}.$minor_number.0"
33−else
34− # Increment the patch version
35− patch_number=${VERSION[2]}
36− let "patch_number++"
37− new_version="${VERSION[0]}.${VERSION[1]}.$patch_number"
38−fi
39−
40−echo "New version: $new_version"
41−
42−git tag $new_version
43−git push --tags