Skip to content

Commit

Permalink
build: introduce git-cliff to generate the changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
pplmx committed Aug 23, 2024
1 parent 6a5560d commit f940d5e
Show file tree
Hide file tree
Showing 2 changed files with 301 additions and 45 deletions.
257 changes: 212 additions & 45 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,54 +2,221 @@

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [unreleased]

## [Unreleased]
### 🚀 Features

## [1.0.0] - 2024-08-18
- *(cxx)* Optimize the CMakeLists
- *(cxx)* Optimize the CMakeLists

### Added
### 🚜 Refactor

- [template] introduce cookiecutter, drop cargo-generate for project templates
- [python] introduce hatch and uv for python boilerplate
- *(cxx)* Rearrange the CMakeLists

### Changed
### 📚 Documentation

- [cpp] update the CMakeLists.txt
- [python] update Dockerfile

## [0.1.1] - 2024-08-18

### Added

- [cpp] add `ccache` to speed up the compile-time
- [go] add GitHub Action jobs
- [all] add some default info to CHANGELOG template
- [template] introduce renovate
- [template] introduce release action
- [cpp] add renovate.json
- [template] introduce the issue template
- [template] introduce the pull request template

### Changed

- [python] replace {{project-name}} dir with src dir
- [cpp] image-building only triggers when a tag is pushed
- [cpp] remove audit action
- [cpp] keep Makefile even if it is a CMake project

### Fixed

## [0.1.0-beta] - 2022-09-21

### Added

- [cpp] distinguishes static and dynamic
- [cpp] distinguishes binary and library
- [all] add Dockerfile for each startup project
- [cpp] add example project [x-pt/example](https://github.com/x-pt/example)
- :sparkles: [template] support python project # THE VERY BEGINNING
- :sparkles: [template] support golang project # THE VERY BEGINNING
- :sparkles: [template] support cpp project # ALMOST DONE
- :earth_asia: [template] `cargo generate gh:x-pt/template`
- Update CHANGELOG
- Update some doc
- Add code_of_conduct
- *(python)* Update the README.md
- *(python)* Split the development guide
- *(python)* Require python version by the input
- *(python)* Update the development.md
- *(cxx)* Remove the rust info
- *(cxx)* Update the README.md

### 🎨 Styling

- Using dash instead of asterisk

### ⚙️ Miscellaneous Tasks

- Rearrange the template inputs location
- Update compose
- Add labeler for issues
- Update issue labeler match rules
- Fix enable-versioned-regex not found
- Make some minor changes
- Add year to license dynamically
- Use local time for license date
- Update the pre-commit version

### Build

- *(go)* Update the package version
- Remove version from the docker compose
- *(python)* Use uv for all scenario
- *(python)* Only install uv at Dockerfile
- *(python)* Add UV_INDEX_URL at Dockerfile

## [1.0.0] - 2024-08-17

### 🚀 Features

- Introduce hatch and uv for python
- Update python template
- Introduce rhai for preprocessing
- Update python boilerplate
- Update python Dockerfile
- Use the specified python version
- *(py)* Update Dockerfile and compose
- *(py)* Update README and refactor Dockerfile and compose

### 🐛 Bug Fixes

- Msvc cannot recognize the header file with '-'

### 🚜 Refactor

- Use cookiecutter instead of cargo-generate
- *(ongoing)* Introduce cookiecutter
- *(ongoing)* Change the location of py cookiecutter
- *(py)* Introduce cookiecutter
- *(init)* Introduce cookiecutter for cxx and golang
- Introduce cookiecutter for cxx and golang
- Minor changes
- Optimize the cmakelist

### 🎨 Styling

- Align the format

### 🧪 Testing

- Add some test cases

### ⚙️ Miscellaneous Tasks

- Update workflow
- Some minor changes
- Update README
- Update README
- Make some minor changes
- Make some minor changes
- Make some minor changes
- Make some minor changes
- Update workflow
- Fix workflow failure

## [0.1.1] - 2024-04-16

### 🚀 Features

- *(github)* Add contributing and issuing template
- *(cmake)* Update the CMakeLists.txt and add Makefile
- *(Makefile)* Add clean command
- *(docker)* Add github action to build docker image
- *(docker)* Add the prefix for github docker image
- *(cmake)* DO NOT IGNORE Makefile
- *(action)* Remove audit
- *(action)* Change the logic of docker build
- *(action)* Add renovate for cpp
- *(action)* Add release and renovate action
- *(cargo-gen)* Add much more support for python
- *(docker)* Build image only when tagged like as v0.1.0
- *(template)* Change {{project-name}} dir to src in python project
- *(changelog)* Add some default info in CHANGELOG.md
- *(go)* Add github actions
- Add .editorconfig
- Add ccache to speed up the compile
- *(cxx)* Replace the cmake build way
- *(cxx)* Add some files to .dockerignore
- *(py)* Add .dockerignore
- Update the docker buildx version
- Update the docker buildx version
- Update the docker buildx version
- Remove macos verify from cxx
- *(go)* Add some options
- Update cxx, go, py template
- Update code of conduct
- Update the docker github action
- *(py)* Add src-layout
- Update go proj template
- Go template with cobra and viper
- *(go)* Some minor changes
- *(go)* Update Dockerfile and github action
- Update the github action cd.yml in go and cxx template
- Update the github action cd.yml in py template
- Introduce pre-commit for all templates
- Update python template ci

### 🐛 Bug Fixes

- Failed to rye init
- Failed to make build for example go on github ci

### ⚙️ Miscellaneous Tasks

- Add missing "bin_type"
- *(support)* Add jetbrains badge
- Some minor changes
- Update checkout to v4
- Change the typo
- Add Makefile tab rule in editorconfig
- Some minor changes
- Use make build and test
- Downgrade the cargo-generate-action
- Some minor changes
- Rename pre-commit file
- Gen go and py example
- Continue to fix project name
- Update liquid syntax

### Build

- *(deps)* Bump actions/checkout from 2 to 3
- *(deps)* Bump cargo-generate/cargo-generate-action
- *(deps)* Bump cargo-generate/cargo-generate-action
- *(deps)* Bump actions/checkout from 3 to 4
- *(deps)* Bump cargo-generate/cargo-generate-action
- *(deps)* Bump peaceiris/actions-gh-pages from 3 to 4
- *(deps)* Bump softprops/action-gh-release from 1 to 2
- *(deps)* Bump cargo-generate/cargo-generate-action

## [0.1.0-beta] - 2022-09-20

### 🚀 Features

- *(init)* Cargo generate cpp project
- *(classify)* Bin and lib(shared or static)
- Add .editorconfig for new project
- :art: optimize the control flow
- *(template)* Add golang and python support
- *(template)* Update cxx CMakeLists.txt
- *(template)* Add Dockerfile
- *(docker)* Support Dockerfile
- *(docker)* Optimize the Dockerfile
- *(docker)* Add static binary compile
- *(docker)* Enable crb repo
- *(docker)* Distinguish static and dynamic binary on Dockerfile
- Add changelog

### 🚜 Refactor

- *(rename)* Org name cxx-gh to gh-proj
- *(rename)* Gh-proj to x-pt
- *(dir)* Rearrange the hierarchy

### 📚 Documentation

- Fix some legacy info

### ⚙️ Miscellaneous Tasks

- *(init)* Update deployment
- *(init)* Remove the checkout of example repo
- *(init)* Include .github dir and exclude .nojekyll file
- *(init)* Remove .nojekyll file
- Replace the commit message
- Enable jekyll to remove .nojekyll
- Rename some variables
- Fix ignore not work
- Add missing fields for cd
- Update ci.yml for cpp project
- Update cd.yml for cpp project
- Update cd.yml for cpp project
- Update cd.yml for cpp project
- Fix ci error
- Remove build action

<!-- generated by git-cliff -->
89 changes: 89 additions & 0 deletions cliff.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
# git-cliff ~ default configuration file
# https://git-cliff.org/docs/configuration
#
# Lines starting with "#" are comments.
# Configuration options are organized into tables and keys.
# See documentation for more information on available options.

[changelog]
# template for the changelog footer
header = """
# Changelog\n
All notable changes to this project will be documented in this file.\n
"""
# template for the changelog body
# https://keats.github.io/tera/docs/#introduction
body = """
{% if version %}\
## [{{ version | trim_start_matches(pat="v") }}] - {{ timestamp | date(format="%Y-%m-%d") }}
{% else %}\
## [unreleased]
{% endif %}\
{% for group, commits in commits | group_by(attribute="group") %}
### {{ group | striptags | trim | upper_first }}
{% for commit in commits %}
- {% if commit.scope %}*({{ commit.scope }})* {% endif %}\
{% if commit.breaking %}[**breaking**] {% endif %}\
{{ commit.message | upper_first }}\
{% endfor %}
{% endfor %}\n
"""
# template for the changelog footer
footer = """
<!-- generated by git-cliff -->
"""
# remove the leading and trailing s
trim = true
# postprocessors
postprocessors = [
# { pattern = '<REPO>', replace = "https://github.com/orhun/git-cliff" }, # replace repository URL
]

[git]
# parse the commits based on https://www.conventionalcommits.org
conventional_commits = true
# filter out the commits that are not conventional
filter_unconventional = true
# process each line of a commit as an individual commit
split_commits = false
# regex for preprocessing the commit messages
commit_preprocessors = [
# Replace issue numbers
#{ pattern = '\((\w+\s)?#([0-9]+)\)', replace = "([#${2}](<REPO>/issues/${2}))"},
# Check spelling of the commit with https://github.com/crate-ci/typos
# If the spelling is incorrect, it will be automatically fixed.
#{ pattern = '.*', replace_command = 'typos --write-changes -' },
]
# regex for parsing and grouping commits
commit_parsers = [
{ message = "^feat", group = "<!-- 0 -->🚀 Features" },
{ message = "^fix", group = "<!-- 1 -->🐛 Bug Fixes" },
{ message = "^doc", group = "<!-- 3 -->📚 Documentation" },
{ message = "^perf", group = "<!-- 4 -->⚡ Performance" },
{ message = "^refactor", group = "<!-- 2 -->🚜 Refactor" },
{ message = "^style", group = "<!-- 5 -->🎨 Styling" },
{ message = "^test", group = "<!-- 6 -->🧪 Testing" },
{ message = "^chore\\(release\\): prepare for", skip = true },
{ message = "^chore\\(deps.*\\)", skip = true },
{ message = "^chore\\(pr\\)", skip = true },
{ message = "^chore\\(pull\\)", skip = true },
{ message = "^chore|^ci", group = "<!-- 7 -->⚙️ Miscellaneous Tasks" },
{ body = ".*security", group = "<!-- 8 -->🛡️ Security" },
{ message = "^revert", group = "<!-- 9 -->◀️ Revert" },
]
# protect breaking changes from being skipped due to matching a skipping commit_parser
protect_breaking_commits = false
# filter out the commits that are not matched by commit parsers
filter_commits = false
# regex for matching git tags
# tag_pattern = "v[0-9].*"
# regex for skipping tags
# skip_tags = ""
# regex for ignoring tags
# ignore_tags = ""
# sort the tags topologically
topo_order = false
# sort the commits inside sections by oldest/newest order
sort_commits = "oldest"
# limit the number of commits included in the changelog.
# limit_commits = 42

0 comments on commit f940d5e

Please sign in to comment.