Skip to content

Commit 1e2ad9b

Browse files
committed
chore: update various configs
1 parent bd5cef0 commit 1e2ad9b

File tree

7 files changed

+185
-83
lines changed

7 files changed

+185
-83
lines changed

.chglog/.changelogrc.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"header": "Changelog",
3+
"types": [
4+
{ "type": "feat", "section": "🌟 Features" },
5+
{ "type": "fix", "section": "🐛 Bug Fixes" },
6+
{ "type": "chore", "section": "🧰 Chores", "hidden": true },
7+
{ "type": "docs", "section": "📖 Documentation", "hidden": true },
8+
{ "type": "style", "section": "💅 Style","hidden": true },
9+
{ "type": "refactor", "section": "✨ Refactor", "hidden": true },
10+
{ "type": "build", "section": "🔨 Build", "hidden": true },
11+
{ "type": "ci", "section": "🤖 CI", "hidden": true },
12+
{ "type": "revert", "section": "⏪ Reverts", "hidden": true },
13+
{ "type": "perf", "section": "🚀 Performance" },
14+
{ "type": "test", "section": "🧪 Tests", "hidden": true }
15+
]
16+
}

.chglog/config.yml

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,24 @@ info:
55
repository_url: https://github.com/damienbutt/emojify
66
options:
77
commits:
8-
# filters:
9-
# Type:
10-
# - feat
11-
# - fix
12-
# - perf
13-
# - refactor
8+
filters:
9+
Type:
10+
- feat
11+
- fix
12+
- perf
1413
commit_groups:
15-
# title_maps:
16-
# feat: Features
17-
# fix: Bug Fixes
18-
# perf: Performance Improvements
19-
# refactor: Code Refactoring
14+
title_maps:
15+
feat: 🌟 Features
16+
fix: 🐛 Bug Fixes
17+
perf: 🚀 Performance
18+
refactor: ✨ Refactor
19+
docs: 📖 Documentation
20+
style: 💅 Style
21+
test: 🧪 Tests
22+
chore: 🧰 Chores
23+
build: 🔨 Build
24+
ci: 🤖 CI
25+
revert: ⏪ Reverts
2026
header:
2127
pattern: "^(\\w*)(?:\\(([\\w\\$\\.\\-\\*\\s]*)\\))?\\:\\s(.*)$"
2228
pattern_maps:
@@ -25,4 +31,4 @@ options:
2531
- Subject
2632
notes:
2733
keywords:
28-
- BREAKING CHANGE
34+
- BREAKING CHANGE

.envrc

Lines changed: 0 additions & 1 deletion
This file was deleted.

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,3 +73,6 @@ aur/*/*.tar.gz
7373
aur/*/*.pkg.tar.*
7474
aur/*/emojify-go/
7575
aur/*/emojify-go-*/
76+
77+
# Local test tools
78+
.local/

.goreleaser.yml

Lines changed: 44 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,10 @@ before:
1010
hooks:
1111
- go mod tidy
1212
- go generate ./...
13+
# Generate full CHANGELOG.md for the repository
1314
- go tool git-chglog --next-tag {{ .Tag }} --output CHANGELOG.md
15+
# Generate release-specific changelog for GitHub release
16+
- go tool git-chglog --next-tag {{ .Tag }} {{ .Tag }} --output RELEASE_NOTES.md
1417

1518
builds:
1619
- id: emojify
@@ -32,22 +35,18 @@ builds:
3235
- -X github.com/damienbutt/emojify-go/internal/version.BuiltBy=goreleaser
3336

3437
archives:
35-
- id: emojify
36-
format: tar.gz
38+
- id: "default"
39+
name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}"
40+
files:
41+
- LICENSE
42+
- README.md
43+
- CHANGELOG.md
44+
- completions/**/*
45+
- man/*.1
46+
# Default format is tar.gz, override for Windows
3747
format_overrides:
3848
- goos: windows
3949
format: zip
40-
name_template: >-
41-
{{ .ProjectName }}_
42-
{{- title .Os }}_
43-
{{- if eq .Arch "amd64" }}x86_64
44-
{{- else if eq .Arch "386" }}i386
45-
{{- else }}{{ .Arch }}{{ end }}
46-
{{- if .Arm }}v{{ .Arm }}{{ end }}
47-
files:
48-
- README.md
49-
- LICENSE
50-
- docs/man/emojify.1
5150

5251
checksum:
5352
name_template: "checksums.txt"
@@ -56,29 +55,9 @@ snapshot:
5655
version_template: "{{ incpatch .Version }}-next"
5756

5857
changelog:
59-
sort: asc
60-
use: github
61-
filters:
62-
exclude:
63-
- "^docs:"
64-
- "^test:"
65-
- "^ci:"
66-
- "^chore:"
67-
- "^style:"
68-
- Merge pull request
69-
- Merge branch
70-
groups:
71-
- title: Features
72-
regexp: '^.*?feat(\(.+\))??!?:.+$'
73-
order: 0
74-
- title: "Bug fixes"
75-
regexp: '^.*?fix(\(.+\))??!?:.+$'
76-
order: 1
77-
- title: "Performance improvements"
78-
regexp: '^.*?perf(\(.+\))??!?:.+$'
79-
order: 2
80-
- title: Others
81-
order: 999
58+
# Disable GoReleaser's built-in changelog generation
59+
# Use git-chglog generated CHANGELOG.md instead
60+
disable: true
8261

8362
# Git configuration for tagging and changelog commits
8463
git:
@@ -88,24 +67,24 @@ git:
8867

8968
# Homebrew formula (stored in main repo)
9069
brews:
91-
- name: emojify-go
92-
repository:
70+
- repository:
9371
owner: damienbutt
94-
name: emojify-go
95-
branch: master
96-
token: "{{ .Env.GITHUB_TOKEN }}"
72+
name: homebrew-tap
73+
name: emojify-go
9774
homepage: "https://github.com/damienbutt/emojify-go"
98-
description: "Lightning-fast Go rewrite of emojify - convert emoji aliases to Unicode emojis"
75+
description: "🎭 Transform plain text into expressive emoji-rich content"
9976
license: "MIT"
100-
commit_author:
101-
name: goreleaserbot
102-
103-
commit_msg_template: "Brew formula update for {{ .ProjectName }} version {{ .Tag }}"
77+
dependencies:
78+
- name: git
79+
directory: Formula
10480
test: |
105-
system "#{bin}/emojify --version"
106-
assert_match "Hello 😁 world", shell_output("echo 'Hello :grin: world' | #{bin}/emojify")
81+
system "#{bin}/emojify", "--version"
10782
install: |
10883
bin.install "emojify"
84+
man1.install "man/emojify.1"
85+
bash_completion.install "completions/emojify.bash" => "emojify"
86+
zsh_completion.install "completions/emojify.zsh" => "_emojify"
87+
fish_completion.install "completions/emojify.fish" => "emojify.fish"
10988
11089
# Scoop bucket for Windows - targeting main repository
11190
scoops:
@@ -218,8 +197,9 @@ nfpms:
218197
rpm:
219198
group: Applications/Text
220199
compression: lzma
221-
signature:
222-
key_file: "{{ .Env.GPG_KEY_FILE }}"
200+
# GPG signing is optional and can be added later
201+
# signature:
202+
# key_file: "{{ .Env.GPG_KEY_FILE }}"
223203
deb:
224204
lintian_overrides:
225205
- statically-linked-binary
@@ -310,6 +290,9 @@ dockers:
310290
- "ghcr.io/damienbutt/emojify:latest-amd64"
311291
dockerfile: Dockerfile
312292
use: buildx
293+
extra_files:
294+
- go.mod
295+
- go.sum
313296
build_flag_templates:
314297
- "--pull"
315298
- "--label=org.opencontainers.image.created={{.Date}}"
@@ -322,6 +305,9 @@ dockers:
322305
- "ghcr.io/damienbutt/emojify:latest-arm64"
323306
dockerfile: Dockerfile
324307
use: buildx
308+
extra_files:
309+
- go.mod
310+
- go.sum
325311
build_flag_templates:
326312
- "--pull"
327313
- "--label=org.opencontainers.image.created={{.Date}}"
@@ -348,51 +334,42 @@ release:
348334
draft: false
349335
prerelease: auto
350336
mode: replace
337+
# The body will be populated from RELEASE_NOTES.md via CLI flag or CI
351338
header: |
352-
## Emojify {{ .Tag }} Release 🚀
353-
354-
Replace emoji aliases with actual emoji characters on the command line!
355-
footer: |
356339
## Installation
357340
358341
### macOS (Homebrew)
359342
```bash
360-
brew tap damienbutt/tap
361-
brew install emojify
343+
brew install damienbutt/emojify-go/emojify-go
362344
```
363345
364346
### Windows (Scoop)
365347
```powershell
366-
scoop bucket add damienbutt https://github.com/damienbutt/scoop-bucket
367-
scoop install emojify
348+
scoop bucket add main
349+
scoop install emojify-go
368350
```
369351
370352
### Windows (Chocolatey)
371353
```powershell
372-
choco install emojify
354+
choco install emojify-go
373355
```
374356
375357
### Windows (WinGet)
376358
```powershell
377-
winget install damienbutt.emojify
359+
winget install damienbutt.emojify-go
378360
```
379361
380362
### Linux (DEB/RPM)
381363
Download the appropriate package from the release assets.
382364
383365
### Arch Linux (AUR)
384366
```bash
385-
yay -S emojify-bin
386-
```
387-
388-
### Snap
389-
```bash
390-
sudo snap install emojify
367+
yay -S emojify-go-bin
391368
```
392369
393370
### Docker
394371
```bash
395372
docker run --rm ghcr.io/damienbutt/emojify:latest "Hello :wave: World"
396373
```
397-
374+
footer: |
398375
**Full Changelog**: https://github.com/damienbutt/emojify-go/compare/{{ .PreviousTag }}...{{ .Tag }}

Makefile

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -428,10 +428,23 @@ goreleaser-build:
428428
@echo "🔨 Building with GoReleaser..."
429429
@goreleaser build --snapshot --clean || echo "⚠️ goreleaser not found"
430430

431+
.PHONY: goreleaser-test-release-notes
432+
goreleaser-test-release-notes:
433+
@echo "📝 Testing release notes generation..."
434+
@if [ -z "$(VERSION)" ]; then echo "⚠️ VERSION is required. Usage: make goreleaser-test-release-notes VERSION=v1.0.0"; exit 1; fi
435+
@echo "📋 Generating release notes for $(VERSION)..."
436+
@git-chglog --tag-filter-pattern $(VERSION) --output RELEASE_NOTES.md $(VERSION)
437+
@echo "✅ Release notes generated: RELEASE_NOTES.md"
438+
@echo "📄 Content preview:"
439+
@head -20 RELEASE_NOTES.md
440+
431441
.PHONY: goreleaser-release
432442
goreleaser-release:
433443
@echo "🚀 Creating release with GoReleaser..."
434-
@goreleaser release --clean || echo "⚠️ goreleaser not found"
444+
@if [ -z "$(VERSION)" ]; then echo "⚠️ VERSION is required. Usage: make goreleaser-release VERSION=v1.0.0"; exit 1; fi
445+
@echo "📝 Generating release notes for $(VERSION)..."
446+
@git-chglog --tag-filter-pattern $(VERSION) --output RELEASE_NOTES.md $(VERSION)
447+
@goreleaser release --clean --release-notes RELEASE_NOTES.md || echo "⚠️ goreleaser not found"
435448

436449
.PHONY: goreleaser-release-with-changelog
437450
goreleaser-release-with-changelog:

0 commit comments

Comments
 (0)