detached 7141aff

Merge pull request #37 from bnema/fix/goreleaser-tag-sort

fix(release): use valid git tag sort
commit
7141aff6d3f9f0a2f5f11a855861ce69896cec16
author
bnema · · 2026-08-05 18:42 UTC
committer
GitHub · · 2026-08-05 18:42 UTC
merge of
3f8fc45 + 02ca8a8 · diff against the first parent
signature
GPG UnverifiedB5690EEEBB952194 The key is unknown
refs
tag: v0.1.1
2 files · +11 -2
M .github/scripts/next-release-tag_test.sh +9 -0
@@ -37,3 +37,12 @@ git tag -a v0.1.1 -m 'release v0.1.1'
3737
3838 git commit --allow-empty --quiet -m 'refactor!: replace extension handshake'
3939 expect 'v0.2.0'
40+
41+# GoReleaser passes tag_sort directly to `git tag --sort`, so keep the
42+# configured semantic-version sort valid before a release run depends on it.
43+tag_sort=$(sed -n 's/^[[:space:]]*tag_sort:[[:space:]]*//p' "$repo_root/.goreleaser.yaml")
44+if [ "$tag_sort" != '-version:refname' ]; then
45+ printf 'goreleaser tag_sort = %q, want %q\n' "$tag_sort" '-version:refname' >&2
46+ exit 1
47+fi
48+git tag --sort "$tag_sort" --list 'v*.*.*' >/dev/null
@@ -37,3 +37,12 @@ git tag -a v0.1.1 -m 'release v0.1.1'
37 37
38 git commit --allow-empty --quiet -m 'refactor!: replace extension handshake'38 git commit --allow-empty --quiet -m 'refactor!: replace extension handshake'
39 expect 'v0.2.0'39 expect 'v0.2.0'
40+
41+# GoReleaser passes tag_sort directly to `git tag --sort`, so keep the
42+# configured semantic-version sort valid before a release run depends on it.
43+tag_sort=$(sed -n 's/^[[:space:]]*tag_sort:[[:space:]]*//p' "$repo_root/.goreleaser.yaml")
44+if [ "$tag_sort" != '-version:refname' ]; then
45+ printf 'goreleaser tag_sort = %q, want %q\n' "$tag_sort" '-version:refname' >&2
46+ exit 1
47+fi
48+git tag --sort "$tag_sort" --list 'v*.*.*' >/dev/null
M .goreleaser.yaml +2 -2
@@ -49,8 +49,8 @@ snapshot:
4949 version_template: "{{ incpatch .Version }}-next"
5050
5151 git:
52- # Generate prerelease changelogs from the previous stable tag.
53- tag_sort: smartsemver
52+ # Git's version-aware sort selects semantic versions correctly.
53+ tag_sort: -version:refname
5454
5555 changelog:
5656 sort: asc
@@ -49,8 +49,8 @@ snapshot:
49 version_template: "{{ incpatch .Version }}-next"49 version_template: "{{ incpatch .Version }}-next"
50 50
51 git:51 git:
52- # Generate prerelease changelogs from the previous stable tag.52+ # Git's version-aware sort selects semantic versions correctly.
53- tag_sort: smartsemver53+ tag_sort: -version:refname
54 54
55 changelog:55 changelog:
56 sort: asc56 sort: asc

Keyboard shortcuts

Single-key shortcuts are on. ctrl k and esc work whatever this says.

ctrl k :
go to a section, branch, tag, file or repository
?
this list
j k
move the row cursor down / up
enter
open the row under the cursor; on Files, a directory opens or closes in place
↑ ↓ ← → home end
in the file tree (focus on a row): previous / next row, close / open a directory or go to its parent / first entry, first / last row. They never open a file
l h
on Files: open a directory or a file / close a directory or go up to its parent, then to the parent page. Elsewhere: into the side panel (on a merge request, its files) / back to the content; there j k move between its controls
g g G
first / last row
/
filter the list; on Files, find a file anywhere in the repository (esc clears, enter opens the best match)
b
switch branch or tag
g s g f g c g b g m g i g r g a
tabs: summary, files, commits, branches & tags, merge requests, issues, releases, actions (when available)
g h
home
w
wide mode: use the whole width of the screen, or not (remembered)
y
copy a permalink pinned to the commit
d u x
diff: split / unified / collapse or expand all
e E
diff: the whole file in view / every file, with the lines the hunks hide
n
merge request: next note in the diff
esc
close a dialog, leave a field

Branches 1

Tags 476

↑↓ moveenter openesc close