on main help sign in
Merge pull request #44 from charmbracelet/goreleaser
8dbabeaRaphael Amorim
.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
1version: 2
3version: 2
4+
2−project_name: opencode
5+project_name: crush
3−before:
6+
4− hooks:
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+
5builds:
15builds:
6 - env:
16 - env:
7 - CGO_ENABLED=0
17 - CGO_ENABLED=0
8 goos:
18 goos:
9 - linux
19 - linux
10 - darwin
20 - darwin
21+ - windows
11 goarch:
22 goarch:
12 - amd64
23 - amd64
13 - arm64
24 - arm64
14 ldflags:
25 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}}
16 main: ./main.go
27 main: ./main.go
17
28
18archives:
29archives:
19− - format: tar.gz
30+ - formats: [tar.gz]
20 name_template: >-
31 name_template: >-
21− opencode-
32+ crush-
22 {{- if eq .Os "darwin" }}mac-
33 {{- if eq .Os "darwin" }}mac-
23 {{- else if eq .Os "windows" }}windows-
34 {{- else if eq .Os "windows" }}windows-
24 {{- else if eq .Os "linux" }}linux-{{end}}
35 {{- else if eq .Os "linux" }}linux-{{end}}
@@ -28,34 +39,31 @@ archives:
28 {{- if .Arm }}v{{ .Arm }}{{ end }}
39 {{- if .Arm }}v{{ .Arm }}{{ end }}
29 format_overrides:
40 format_overrides:
30 - goos: windows
41 - goos: windows
31− format: zip
42+ formats: [zip]
43+
32checksum:
44checksum:
33 name_template: "checksums.txt"
45 name_template: "checksums.txt"
46+
34snapshot:
47snapshot:
35− name_template: "0.0.0-{{ .Timestamp }}"
48+ version_template: "0.0.0-{{ .Timestamp }}"
49+
36aurs:
50aurs:
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 }}"
51+ - private_key: "{{ .Env.AUR_KEY }}"
44− git_url: "ssh://aur@aur.archlinux.org/opencode-ai-bin.git"
52+ git_url: "ssh://aur@aur.archlinux.org/charmbracelet-bin.git"
45 provides:
53 provides:
46− - opencode
54+ - crush
47 conflicts:
55 conflicts:
48− - opencode
56+ - crush
49 package: |-
57 package: |-
50− install -Dm755 ./opencode "${pkgdir}/usr/bin/opencode"
58+ install -Dm755 ./crush "${pkgdir}/usr/bin/crush"
51−brews:
59+
60+homebrew_casks:
52 - repository:
61 - repository:
53− owner: opencode-ai
62+ owner: charmbracelet
54 name: homebrew-tap
63 name: homebrew-tap
64+
55nfpms:
65nfpms:
56− - maintainer: kujtimiihoxha
57− description: terminal based agent that can build anything
58− formats:
66+ - formats:
59 - deb
67 - deb
60 - rpm
68 - rpm
61 file_name_template: >-
69 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