File tree Expand file tree Collapse file tree 6 files changed +86
-17
lines changed Expand file tree Collapse file tree 6 files changed +86
-17
lines changed Original file line number Diff line number Diff line change 1+ changesDir : .changes
2+ unreleasedDir : unreleased
3+ headerPath : ../.chglog/CHANGELOG_HEADER.tpl.md
4+ changelogPath : CHANGELOG.md
5+ versionExt : md
6+ newlines :
7+ afterChangelogHeader : 0
8+ beforeChangelogVersion : 1
9+ endOfVersion : 1
10+ replacements :
11+ - path : " VERSION"
12+ find : " .*"
13+ replace : " {{.VersionNoPrefix}}"
Original file line number Diff line number Diff line change 1- # Changelog
2-
3- All notable changes to this project will be documented in this file.
4-
5- The format is based on [ Keep a Changelog] ( http://keepachangelog.com/en/1.0.0/ ) and this project adheres to [ Semantic Versioning] ( http://semver.org ) .
6-
7- {{ range .Versions }}
8- ## {{ if .Tag.Previous }}[ {{ .Tag.Name }}] {{ else }}{{ .Tag.Name }}{{ end }} ({{ datetime "2006-01-02" .Tag.Date }})
1+ {{ range .Versions -}}
2+ ## {{ if .Tag.Previous }}[ {{ .Tag.Name }}] ({{ $.Info.RepositoryURL }}/compare/{{ .Tag.Previous.Name }}...{{ .Tag.Name }}){{ else }}{{ .Tag.Name }}{{ end }} ({{ datetime "2006-01-02" .Tag.Date }})
93{{ range .CommitGroups }}
104### {{ .Title }}
115{{ range .Commits }}
@@ -22,12 +16,4 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a
2216{{ end -}}
2317{{ end }}
2418Full Changelog: {{ if .Tag.Previous }}[ {{ .Tag.Previous.Name }}...{{ .Tag.Name }}] ({{ $.Info.RepositoryURL }}/compare/{{ .Tag.Previous.Name }}...{{ .Tag.Name }}){{ else }}[ {{ .Tag.Name }}] ({{ $.Info.RepositoryURL }}/commits/{{ .Tag.Name }}){{ end }}
25- {{ end }}
26-
27- {{- if .Versions }}
28- {{ range .Versions -}}
29- {{ if .Tag.Previous -}}
30- [ {{ .Tag.Name }}] : {{ $.Info.RepositoryURL }}/compare/{{ .Tag.Previous.Name }}...{{ .Tag.Name }}
31- {{ end -}}
3219{{ end -}}
33- {{ end -}}
Original file line number Diff line number Diff line change 1+ # Changelog
2+
3+ All notable changes to this project will be documented in this file.
4+
5+ The format is based on [ Keep a Changelog] ( http://keepachangelog.com/en/1.0.0/ ) and this project adheres to [ Semantic Versioning] ( http://semver.org ) .
Original file line number Diff line number Diff line change 1- Taskfile.yaml
Original file line number Diff line number Diff line change 1+ # https://taskfile.dev
2+
3+ version : " 3"
4+
5+ env :
6+ TAG_PREFIX : v
7+ CHANGES_DIR : .changes
8+
9+ tasks :
10+ prepare :
11+ desc : Install tools
12+ cmds :
13+ - go install github.com/git-chglog/git-chglog/cmd/git-chglog@latest
14+ - go install github.com/miniscruff/changie@latest
15+
16+ batch-changelog :
17+ desc : Generate changelog for existing git tags
18+ cmds :
19+ - rm ${CHANGES_DIR}/${TAG_PREFIX}*.md || true
20+ - for VERSION_TAG in $(git -c 'versionsort.suffix=-' tag --list --sort=v:refname); do git-chglog --output ${CHANGES_DIR}/${VERSION_TAG}.md ${VERSION_TAG} ; done
21+ silent : true
22+
23+ changelog :
24+ desc : Generate changelog for an existing version
25+ vars :
26+ VERSION_TAG : ${TAG_PREFIX}{{.CLI_ARGS}}
27+ cmds :
28+ - git-chglog --output ${CHANGES_DIR}/{{.VERSION_TAG}}.md {{.VERSION_TAG}}
29+ silent : true
30+
31+ changelog-next :
32+ desc : Generate changelog for a new version
33+ vars :
34+ VERSION_TAG : ${TAG_PREFIX}{{.CLI_ARGS}}
35+ cmds :
36+ - git-chglog --output ${CHANGES_DIR}/{{.VERSION_TAG}}.md --next-tag {{.VERSION_TAG}}
37+ silent : true
38+
39+ bump-version :
40+ desc : Bump version
41+ cmds :
42+ - echo {{.CLI_ARGS}} > VERSION
43+ silent : true
44+
45+ commit-release :
46+ desc : Create release commit
47+ vars :
48+ VERSION_TAG : ${TAG_PREFIX}{{.CLI_ARGS}}
49+ cmds :
50+ - git add ${CHANGES_DIR}
51+ - git add CHANGELOG.md
52+ - git add VERSION
53+ - |
54+ git commit -m "chore(release): {{.VERSION_TAG}}"
55+ silent : true
56+
57+ release :
58+ desc : Generate release commit
59+ vars :
60+ VERSION_TAG : ${TAG_PREFIX}{{.CLI_ARGS}}
61+ cmds :
62+ - echo "Releasing version {{.VERSION_TAG}}"
63+ - task changelog-next -- {{.CLI_ARGS}}
64+ - task bump-version -- {{.CLI_ARGS}}
65+ - task commit-release -- {{.CLI_ARGS}}
66+ silent : true
You can’t perform that action at this time.
0 commit comments