diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 8629e1b..03da250 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -63,7 +63,7 @@ jobs: id: git-cliff with: config: cliff.toml - args: --verbose + args: --latest --verbose env: OUTPUT: CHANGELOG.md - name: Print the changelog diff --git a/Cargo.lock b/Cargo.lock index cda533e..0e446dc 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -166,7 +166,7 @@ checksum = "6c8640c5d730cb13ebd907d8d04b52f55ac9a2eec55b440c8892f40d56c76c1d" [[package]] name = "mod_installer" -version = "3.5.0" +version = "5.0.0" dependencies = [ "clap", "env_logger", diff --git a/Cargo.toml b/Cargo.toml index 42319f8..f7b78fa 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "mod_installer" -version = "3.5.0" +version = "5.0.0" edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/cliff.toml b/cliff.toml index 3688e1d..cf39328 100644 --- a/cliff.toml +++ b/cliff.toml @@ -1,37 +1,36 @@ # 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. - +[remote.github] +owner = "dark0dave" +repo = "mod_installer" [changelog] # changelog header -header = """ -# Changelog\n -All notable changes to this project will be documented in this file.\n -""" +header = "" # template for the changelog body # https://tera.netlify.app/docs body = """ -{% if version %}\ - ## [{{ version | trim_start_matches(pat="v") }}] - {{ timestamp | date(format="%Y-%m-%d") }} -{% else %}\ - ## [unreleased] -{% endif %}\ + +### Changelog {% for group, commits in commits | group_by(attribute="group") %} - ### {{ group | upper_first }} - {% for commit in commits %} - - {% if commit.breaking %}[**breaking**] {% endif %}{{ commit.message | upper_first }}\ - {% endfor %} -{% endfor %}\n + \n#### {{ group | striptags | trim | upper_first }}: + {% for commit in commits + | filter(attribute="group") + | unique(attribute="message") + | filter(attribute="merge_commit", value=false) %} + - {{commit.scope}}: \ + {{ commit.message }} ([{{ commit.id | truncate(length=7, end="") }}](https://github.com/dark0dave/post_infinity/commit/{{ commit.id }})\ + {% if commit.github.username %} by @{{ commit.github.username }}\ + {% else %} by [{{ commit.author.name }}](https://github.com/{{ commit.author.name }})){%- endif %}\ + {% if commit.github.pr_number %} in #{{ commit.github.pr_number }}{%- endif %} + {%- endfor -%} +{% endfor %} + +Full Changelog: [{{ previous.version }}...{{ version }}](https://github.com/dark0dave/mod_installer/compare/{{ previous.version }}...{{ version }}) """ # remove the leading and trailing whitespace from the template trim = true # changelog footer -footer = """ - -""" +footer = "" # postprocessors postprocessors = [ # { pattern = '', replace = "https://github.com/orhun/git-cliff" }, # replace repository URL @@ -40,7 +39,7 @@ postprocessors = [ # parse the commits based on https://www.conventionalcommits.org conventional_commits = true # filter out the commits that are not conventional -filter_unconventional = true +filter_unconventional = false # process each line of a commit as an individual commit split_commits = false # regex for preprocessing the commit messages @@ -49,31 +48,30 @@ commit_preprocessors = [ ] # regex for parsing and grouping commits commit_parsers = [ - { message = "^feat", group = "Features" }, - { message = "^fix", group = "Bug Fixes" }, - { message = "^doc", group = "Documentation" }, - { message = "^perf", group = "Performance" }, - { message = "^refactor", group = "Refactor" }, - { message = "^style", group = "Styling" }, - { message = "^test", group = "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 = "Miscellaneous Tasks" }, - { body = ".*security", group = "Security" }, - { message = "^revert", group = "Revert" }, + { message = "^(refactor|ref)", group = "Internal/Other", scope="ref" }, + { message = "^build", group = "Internal/Other", scope="build" }, + { message = "^chore", group = "Internal/Other", scope="chore" }, + { message = "^ci", group = "Internal/Other", scope="ci" }, + { message = "^dep", group = "Internal/Other", scope="dep" }, + { message = "^doc", group = "Internal/Other", scope="doc" }, + { message = "^feat", group = "Features", scope="feat" }, + { message = "^fix", group = "Fixes", scope="fix" }, + { message = "^perf", group = "Internal/Other", scope="perf" }, + { message = "^style", group = "Internal/Other", scope="style" }, + { message = "^test", group = "Internal/Other", scope="test" }, + { body = ".*security", group = "Internal/Other", scope="sec" }, + { message = "^revert", group = "Internal/Other", scope="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 # glob pattern for matching git tags -tag_pattern = "v[0-9]*" +tag_pattern = "^v[0-9]+.[0-9]+.[0-9]+$" # regex for skipping tags -skip_tags = "v0.1.0-beta.1" +skip_tags = "^nightly-.*" # regex for ignoring tags -ignore_tags = "" +ignore_tags = "^nightly-.*" # sort the tags topologically topo_order = false # sort the commits inside sections by oldest/newest order