Skip to content

Commit

Permalink
Merge pull request #926 from hybridgroup/dev
Browse files Browse the repository at this point in the history
all: prepare for release v2.0.1
  • Loading branch information
gen2thomas authored May 21, 2023
2 parents 57b31e8 + eda2790 commit 20a92a3
Show file tree
Hide file tree
Showing 8 changed files with 2,754 additions and 1,180 deletions.
30 changes: 23 additions & 7 deletions .chglog/CHANGELOG.gobot.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,28 @@
{{ range .Versions }}
{{ if .Tag.Previous }}{{ .Tag.Name }}{{ else }}{{ .Tag.Name }}{{ end }}
---
# {{ .Info.Title }}

Please adjust manually before add content to CHANGELOG.md.

{{ if .Versions -}}
## [Unreleased]({{ .Info.RepositoryURL }}/compare/{{ $latest := index .Versions 0 }}{{ $latest.Tag.Name }}...HEAD)

{{ if .Unreleased.CommitGroups -}}
{{ range .Unreleased.CommitGroups -}}
### {{ .Title }}
{{ range .Commits -}}
* {{ if .Scope }}**{{ .Scope }}:** {{ end }}{{ .Subject }}
{{ end }}
{{ end -}}
{{ end -}}
{{ end -}}

{{ range .Versions }}## {{ 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 }}**
### {{ .Title }}

{{ range .Commits -}}
* {{ if .Scope }}**>{{ .Scope }}:<** {{ end }}{{ .Subject }}
{{ end }}
{{ range .Commits -}}
* {{ if .Scope }}**{{ .Scope }}:** {{ end }}{{ .Subject }}
{{ end }}
{{ end -}}

{{- if .NoteGroups -}}
Expand Down
68 changes: 51 additions & 17 deletions .chglog/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,39 +4,73 @@

We using <https://github.com/git-chglog/git-chglog>, so refer to this side for installation instructions.

It is possible to test the tool by `git-chglog --init` without overriding anything.

## Usage

Example for a new release "v2.0.0":
Example for a new release "v2.0.1":

```sh
git checkout release
git pull
git fetch --tags
git-chglog --no-case --next-tag 2.0.0 v1.16.0.. > .chglog/chglog_tmp.md
git checkout dev
git pull upstream dev
git-chglog --config .chglog/config_gobot.yml --no-case --next-tag v2.0.1 v2.0.0.. > .chglog/chglog_tmp.md
```

## Compare

If unsure about any result of running git-chglog, just use:
`git log --since=2022-05-02 --pretty="- %s`
`git log --since=2022-05-15 --pretty="- %s`

## Manual adjustment

Because there is no commit style guide yet, some manual work is needed to bring the items in the correct position.
Please refer to the current CHANGELOG.md to find the correct way. In general we try to use this style:
Most likely some manual work is needed to bring the items in the correct position. We use the style from
["keep a changelog"](https://keepachangelog.com/en/1.1.0/), together with the [standard template](https://github.com/git-chglog/example-type-scope-subject/blob/master/CHANGELOG.standard.md).
The changelog will be generated based on the commit messages, so please follow the
[Convention for Pull Request Descriptions](../CONTRIBUTING.md).

An example for the following commits:

* type(scope): description
* i2c(PCF8583): added
* gpio(HD44780): fix wrong constants
* raspi(PWM): refactor usage
* docs(core): usage of Kernel driver
* or alternative: core(docs): usage of Kernel driver
* build(style): adjust rule for golangci-lint

```md
### build

* **style**: adjust rule for golangci-lint

### docs

* **core**: usage of Kernel driver

### i2c

* **PCF8583**: added


* titles will be converted to lower case
* titles are lexical ordered
* each platform has its own title (e.g. **raspi**)
* fixes has the title **bugfix**
* title **api**, **drivers** or **example** is used for changes below related folder
* title **core** is used for changes of common code, e.g. utilities, system
* further special titles **build**, **docs** and **test** can be used
### gpio

* **HD44780**: fix wrong constants

### raspi

* **PWM**: refactor usage

### Type

* **scope:** description
```

If in doubt, please refer to the current CHANGELOG.md to find the correct way.

## Finalization

After all work is done in the temporary changelog file, the content can be moved to the real one and the "chglog_tmp.md"
file can be removed.

## TODO's

* introduce a commit style guide
* convert the changelog format to a more common style, see <https://github.com/git-chglog/example-type-scope-subject/tree/master>
28 changes: 0 additions & 28 deletions .chglog/config.yml

This file was deleted.

15 changes: 15 additions & 0 deletions .chglog/config_gobot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
style: github
template: CHANGELOG.gobot.md
info:
title: Auto-Generated Changelog
repository_url: https://github.com/hybridgroup/gobot
options:
header:
pattern: "^(\\w*)(?:\\(([\\w\\$\\.\\-\\*\\s]*)\\))?\\:?\\s(.*)$"
pattern_maps:
- Type
- Scope
- Subject
notes:
keywords:
- BREAKING CHANGE
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,6 @@ count.out
vendor/
.idea/
coverage.txt
.chglog/chglog_tmp*.md
.chglog/CHANGELOG.tpl*.md
.chglog/config.yml
Loading

0 comments on commit 20a92a3

Please sign in to comment.