Skip to content

Commit 9e1a122

Browse files
committed
[INTERNAL] Add chglog config + npm release scripts
1 parent 0518658 commit 9e1a122

File tree

5 files changed

+143
-2
lines changed

5 files changed

+143
-2
lines changed

.chglog/CHANGELOG.tpl.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# Changelog
2+
All notable changes to this project will be documented in this file.
3+
This project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
4+
5+
{{ if .Versions -}}
6+
A list of unreleased changes can be found [here]({{ .Info.RepositoryURL }}/compare/{{ $latest := index .Versions 0 }}{{ $latest.Tag.Name }}...HEAD).
7+
{{ end -}}
8+
9+
{{ range .Versions }}
10+
<a name="{{ .Tag.Name }}"></a>
11+
## {{ if .Tag.Previous }}[{{ .Tag.Name }}]{{ else }}{{ .Tag.Name }}{{ end }} - {{ datetime "2006-01-02" .Tag.Date }}
12+
{{ range .CommitGroups -}}
13+
### {{ .Title }}
14+
{{ range .Commits -}}
15+
- {{ if .Scope }}**{{ .Scope }}:** {{ end }}{{ .Subject }} [`{{ .Hash.Short }}`]({{ $.Info.RepositoryURL }}/commit/{{ .Hash.Long }})
16+
{{ end }}
17+
{{ end -}}
18+
19+
{{- if .RevertCommits -}}
20+
### Reverts
21+
{{ range .RevertCommits -}}
22+
- {{ .Revert.Header }}
23+
{{ end }}
24+
{{ end -}}
25+
26+
{{- if .NoteGroups -}}
27+
{{ range .NoteGroups -}}
28+
### {{ .Title }}
29+
{{ range .Notes }}
30+
{{ .Body }}
31+
{{ end }}
32+
{{ end -}}
33+
{{ end -}}
34+
{{ end -}}
35+
36+
{{- if .Versions }}
37+
{{ range .Versions -}}
38+
{{ if .Tag.Previous -}}
39+
[{{ .Tag.Name }}]: {{ $.Info.RepositoryURL }}/compare/{{ .Tag.Previous.Name }}...{{ .Tag.Name }}
40+
{{ end -}}
41+
{{ end -}}
42+
{{ end -}}

.chglog/RELEASE.tpl.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
{{ range .Versions }}
2+
{{ range .CommitGroups -}}
3+
### {{ .Title }}
4+
{{ range .Commits -}}
5+
- {{ if .Scope }}**{{ .Scope }}:** {{ end }}{{ .Subject }} [`{{ .Hash.Short }}`]({{ $.Info.RepositoryURL }}/commit/{{ .Hash.Long }})
6+
{{ end }}
7+
{{ end -}}
8+
9+
{{- if .RevertCommits -}}
10+
### Reverts
11+
{{ range .RevertCommits -}}
12+
- {{ .Revert.Header }}
13+
{{ end }}
14+
{{ end -}}
15+
16+
{{- if .NoteGroups -}}
17+
{{ range .NoteGroups -}}
18+
### {{ .Title }}
19+
{{ range .Notes }}
20+
{{ .Body }}
21+
{{ end }}
22+
{{ end -}}
23+
{{ end -}}
24+
25+
{{ if .Tag.Previous }}
26+
### All changes
27+
<a name="{{ .Tag.Previous.Name }}...{{ .Tag.Name }}"></a>
28+
`[{{ .Tag.Previous.Name }}...{{ .Tag.Name }}]``
29+
{{ end }}
30+
31+
{{ if .Tag.Previous -}}
32+
[{{ .Tag.Previous.Name }}...{{ .Tag.Name }}]: {{ $.Info.RepositoryURL }}/compare/{{ .Tag.Previous.Name }}...{{ .Tag.Name }}
33+
{{ end -}}
34+
{{ end -}}

.chglog/config.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
style: github
2+
template: CHANGELOG.tpl.md
3+
info:
4+
title: CHANGELOG
5+
repository_url: https://github.com/SAP/ui5-server
6+
options:
7+
commits:
8+
filters:
9+
Type:
10+
- FEATURE
11+
- FIX
12+
- PERF
13+
- INTERNAL
14+
commit_groups:
15+
title_maps:
16+
FEATURE: Features
17+
FIX: Bug Fixes
18+
PERF: Performance Improvements
19+
INTERNAL: Internal Changes
20+
header:
21+
pattern: "^\\[(\\w*)\\]\\s(?:(\\w*)\\:\\s)?(.*)$"
22+
pattern_maps:
23+
- Type
24+
- Scope
25+
- Subject
26+
issues:
27+
prefix:
28+
- "#"
29+
notes:
30+
keywords:
31+
- BREAKING CHANGE

.chglog/release-config.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
style: github
2+
template: RELEASE.tpl.md
3+
info:
4+
repository_url: https://github.com/SAP/ui5-server
5+
options:
6+
commits:
7+
filters:
8+
Type:
9+
- FEATURE
10+
- FIX
11+
- PERF
12+
- INTERNAL
13+
commit_groups:
14+
title_maps:
15+
FEATURE: Features
16+
FIX: Bug Fixes
17+
PERF: Performance Improvements
18+
INTERNAL: Internal Changes
19+
header:
20+
pattern: "^\\[(\\w*)\\]\\s(?:(\\w*)\\:\\s)?(.*)$"
21+
pattern_maps:
22+
- Type
23+
- Scope
24+
- Subject
25+
issues:
26+
prefix:
27+
- "#"
28+
notes:
29+
keywords:
30+
- BREAKING CHANGE

package.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@ui5/server",
33
"version": "0.0.1",
4-
"description": "UI5 Build and Development Tooling - Serve",
4+
"description": "UI5 Build and Development Tooling - Server",
55
"author": "SAP SE (https://www.sap.com)",
66
"license": "Apache-2.0",
77
"keywords": [
@@ -27,7 +27,11 @@
2727
"unit-inspect": "cross-env DEBUG=*,-babel,-ava node --inspect-brk node_modules/ava/profile.js",
2828
"coverage": "nyc npm run unit",
2929
"jsdoc": "npm run jsdoc-generate && opn jsdocs/index.html",
30-
"jsdoc-generate": "node_modules/.bin/jsdoc -c ./jsdoc.json ./lib/ || (echo 'Error during JSDoc generation! Check log.' && exit 1)"
30+
"jsdoc-generate": "node_modules/.bin/jsdoc -c ./jsdoc.json ./lib/ || (echo 'Error during JSDoc generation! Check log.' && exit 1)",
31+
"preversion": "npm test",
32+
"version": "git-chglog --next-tag v$npm_package_version -o CHANGELOG.md && git add CHANGELOG.md",
33+
"postversion": "git push --follow-tags",
34+
"release-note": "git-chglog -c .chglog/release-config.yml v$npm_package_version"
3135
},
3236
"ava": {
3337
"files": [

0 commit comments

Comments
 (0)