mirror of
https://github.com/taigrr/bitcask
synced 2025-01-18 04:03:17 -08:00
Fix goreleaser config and improve release notes / changelog
This commit is contained in:
parent
afdf956e7a
commit
3616a4549b
22
.chglog/CHANGELOG.tpl.md
Executable file
22
.chglog/CHANGELOG.tpl.md
Executable file
@ -0,0 +1,22 @@
|
|||||||
|
{{ range .Versions }}
|
||||||
|
<a name="{{ .Tag.Name }}"></a>
|
||||||
|
## {{ if .Tag.Previous }}[{{ .Tag.Name }}]({{ $.Info.RepositoryURL }}/compare/{{ .Tag.Previous.Name }}...{{ .Tag.Name }}){{ else }}{{ .Tag.Name }}{{ end }} ({{ datetime "2006-01-02" .Tag.Date }})
|
||||||
|
|
||||||
|
{{ range .CommitGroups -}}
|
||||||
|
### {{ .Title }}
|
||||||
|
|
||||||
|
{{ range .Commits -}}
|
||||||
|
* {{ .Subject }}
|
||||||
|
{{ end }}
|
||||||
|
{{ end -}}
|
||||||
|
|
||||||
|
{{- if .NoteGroups -}}
|
||||||
|
{{ range .NoteGroups -}}
|
||||||
|
### {{ .Title }}
|
||||||
|
|
||||||
|
{{ range .Notes }}
|
||||||
|
{{ .Body }}
|
||||||
|
{{ end }}
|
||||||
|
{{ end -}}
|
||||||
|
{{ end -}}
|
||||||
|
{{ end -}}
|
28
.chglog/config.yml
Executable file
28
.chglog/config.yml
Executable file
@ -0,0 +1,28 @@
|
|||||||
|
---
|
||||||
|
style: Github
|
||||||
|
template: CHANGELOG.tpl.md
|
||||||
|
info:
|
||||||
|
title: CHANGELOG
|
||||||
|
repository_url: https://github.com/prologic/bitcask
|
||||||
|
options:
|
||||||
|
commits:
|
||||||
|
filters:
|
||||||
|
Type:
|
||||||
|
- Add
|
||||||
|
- Fix
|
||||||
|
- Update
|
||||||
|
- Document
|
||||||
|
commit_groups:
|
||||||
|
title_maps:
|
||||||
|
Add: Features
|
||||||
|
Update: Updates
|
||||||
|
Fix: Bug Fixes
|
||||||
|
Document: Documentation
|
||||||
|
header:
|
||||||
|
pattern: "^((\\w+)\\s.*)$"
|
||||||
|
pattern_maps:
|
||||||
|
- Subject
|
||||||
|
- Type
|
||||||
|
notes:
|
||||||
|
keywords:
|
||||||
|
- BREAKING CHANGE
|
@ -1,12 +1,13 @@
|
|||||||
|
---
|
||||||
builds:
|
builds:
|
||||||
-
|
-
|
||||||
binary: bitcask
|
binary: bitcask
|
||||||
main: ./cmd/bitcask
|
main: ./cmd/bitcask
|
||||||
flags: -tags "static_build"
|
flags: -tags "static_build"
|
||||||
ldflags: -w -X github.com/prologic/bitcask/internal.Version={{.Version}} -X github.com/prologic/bitcask/internal.Commit={{.Commit}}
|
ldflags: -w -X github.com/prologic/bitcask/internal.Version={{.Version}} -X github.com/prologic/bitcask/internal.Commit={{.Commit}}
|
||||||
env:
|
env:
|
||||||
- CGO_ENABLED=0
|
- CGO_ENABLED=0
|
||||||
-
|
-
|
||||||
binary: bitcaskd
|
binary: bitcaskd
|
||||||
main: ./cmd/bitcaskd
|
main: ./cmd/bitcaskd
|
||||||
flags: -tags "static_build"
|
flags: -tags "static_build"
|
||||||
@ -22,13 +23,10 @@ archive:
|
|||||||
windows: Windows
|
windows: Windows
|
||||||
386: i386
|
386: i386
|
||||||
amd64: x86_64
|
amd64: x86_64
|
||||||
checksum:
|
signs:
|
||||||
name_template: 'checksums.txt'
|
- artifacts: checksum
|
||||||
snapshot:
|
release:
|
||||||
name_template: "{{ .Tag }}-next"
|
github:
|
||||||
changelog:
|
owner: prologic
|
||||||
sort: asc
|
name: bitcask
|
||||||
filters:
|
draft: true
|
||||||
exclude:
|
|
||||||
- '^docs:'
|
|
||||||
- '^test:'
|
|
||||||
|
@ -1,16 +1,19 @@
|
|||||||
#!/bin/sh
|
#!/bin/bash
|
||||||
|
|
||||||
# Get the highest tag number
|
# Get the highest tag number
|
||||||
VERSION="$(git describe --abbrev=0 --tags)"
|
VERSION="$(git describe --abbrev=0 --tags)"
|
||||||
VERSION=${VERSION:-'0.0.0'}
|
VERSION=${VERSION:-'0.0.0'}
|
||||||
|
|
||||||
# Get number parts
|
# Get number parts
|
||||||
MAJOR="${VERSION%%.*}"; VERSION="${VERSION#*.}"
|
MAJOR="${VERSION%%.*}"
|
||||||
MINOR="${VERSION%%.*}"; VERSION="${VERSION#*.}"
|
VERSION="${VERSION#*.}"
|
||||||
PATCH="${VERSION%%.*}"; VERSION="${VERSION#*.}"
|
MINOR="${VERSION%%.*}"
|
||||||
|
VERSION="${VERSION#*.}"
|
||||||
|
PATCH="${VERSION%%.*}"
|
||||||
|
VERSION="${VERSION#*.}"
|
||||||
|
|
||||||
# Increase version
|
# Increase version
|
||||||
PATCH=$((PATCH+1))
|
PATCH=$((PATCH + 1))
|
||||||
|
|
||||||
TAG="${1}"
|
TAG="${1}"
|
||||||
|
|
||||||
@ -20,6 +23,10 @@ fi
|
|||||||
|
|
||||||
echo "Releasing ${TAG} ..."
|
echo "Releasing ${TAG} ..."
|
||||||
|
|
||||||
|
git-chglog --next-tag="${TAG}" --output CHANGELOG.md
|
||||||
|
git commit -a -m "Update CHANGELOG for ${TAG}"
|
||||||
git tag -a -s -m "Release ${TAG}" "${TAG}"
|
git tag -a -s -m "Release ${TAG}" "${TAG}"
|
||||||
git push --tags
|
git push --tags
|
||||||
goreleaser release --rm-dist
|
goreleaser release \
|
||||||
|
--rm-dist \
|
||||||
|
--release-notes <(git-chglog "${TAG}" | tail -n+5)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user