Skip to content

Commit 80c58ff

Browse files
build: streamline goreleaser configuration
- Consolidate environment variables - Simplify build and archive definitions - Add -trimpath flag for smaller binaries - Use CommitTimestamp for reproducible builds -
1 parent 4a8a684 commit 80c58ff

2 files changed

Lines changed: 26 additions & 43 deletions

File tree

.goreleaser.yaml

Lines changed: 23 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,77 +1,57 @@
1-
# .goreleaser.yaml
2-
# Latest GoReleaser v2 schema
31
version: 2
42

53
project_name: kairo
64

5+
env:
6+
- CGO_ENABLED=0
7+
78
before:
89
hooks:
910
- go mod tidy
1011

1112
builds:
12-
- env:
13-
- CGO_ENABLED=0
14-
goos:
15-
- linux
16-
- windows
17-
- darwin
18-
goarch:
19-
- amd64
20-
- arm64
13+
- id: kairo
2114
main: ./cmd/kairo
2215
binary: kairo
16+
goos: [linux, windows, darwin]
17+
goarch: [amd64, arm64]
18+
flags:
19+
- -trimpath
20+
mod_timestamp: "{{ .CommitTimestamp }}"
2321
ldflags:
24-
- -s -w -X main.version={{.Version}} -X main.commit={{.Commit}} -X main.date={{.Date}}
22+
- -s -w
23+
- -X main.version={{ .Version }}
24+
- -X main.commit={{ .Commit }}
25+
- -X main.date={{ .CommitDate }}
2526

2627
archives:
27-
- format: tar.gz
28-
# use zip for windows archives
28+
- formats: [tar.gz]
2929
format_overrides:
3030
- goos: windows
31-
format: zip
31+
formats: [zip]
3232
name_template: >-
33-
{{ .ProjectName }}_
34-
{{- .Os }}_
35-
{{- if eq .Arch "amd64" }}x86_64
36-
{{- else if eq .Arch "386" }}i386
37-
{{- else }}{{ .Arch }}{{ end }}
38-
{{- if .Arm }}v{{ .Arm }}{{ end }}
33+
{{ .ProjectName }}_{{ .Os }}_{{- if eq .Arch "amd64" }}x86_64{{ else }}{{ .Arch }}{{ end }}
34+
3935
files:
4036
- LICENSE
4137
- README.md
4238
- CHANGELOG.md
4339
- configs/*.toml
4440

4541
checksum:
46-
name_template: 'checksums.txt'
47-
algorithm: sha256
42+
name_template: checksums.txt
4843

4944
snapshot:
5045
name_template: "{{ .Tag }}-next"
5146

5247
changelog:
48+
use: git
5349
sort: asc
5450
filters:
5551
exclude:
5652
- '^docs:'
5753
- '^test:'
58-
- 'README'
59-
- Merge pull request
60-
- Merge branch
61-
62-
# Modern Homebrew formula
63-
brews:
64-
- name: kairo
65-
repository:
66-
owner: programmersd21
67-
name: homebrew-tap
68-
directory: Formula
69-
homepage: "https://github.com/programmersd21/kairo"
70-
description: "Premium Terminal Task Manager with Lua Extensibility"
71-
license: "MIT"
72-
install: |
73-
bin.install "kairo"
74-
# Install sample plugins
75-
(etc/"kairo/plugins").install Dir["plugins/*.lua"]
76-
test: |
77-
system "#{bin}/kairo version"
54+
- '^chore:'
55+
- README
56+
- Merge
57+

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1515
- **Version Management**: `kairo version` command to display installed version
1616
- **Update Command**: `kairo update` command for one-step updates via `go install github.com/programmersd21/kairo/cmd/kairo@latest`
1717

18+
### Fixed
19+
- **.gorelease.yaml** was failing on homebrew step, so it was resolved.
20+
1821
### Changed
1922
- Updated theme registry to 32 total themes (12 legacy + 20 new)
2023

0 commit comments

Comments
 (0)