Skip to content

Commit

Permalink
build(release): use release-plz config instead of cliff.toml (#594)
Browse files Browse the repository at this point in the history
release-plz deprecated configuration of changelog-path:
https://release-plz.ieni.dev/docs/config#the-changelog_config-field

There are a lot of differences between git-cliff and release-plz, so
it's convenient to rely on single tool
  • Loading branch information
DDtKey authored Apr 27, 2024
1 parent 24ea0c6 commit 849063d
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 119 deletions.
11 changes: 0 additions & 11 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@

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.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.15.0] - 2023-09-28

### Added
Expand Down Expand Up @@ -159,11 +156,3 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

- Provide a default password for the postgres image.
There seems to be an unfortunate breaking change in the postgres image that we need to cater for.

[Unreleased]: https://github.com/testcontainers/testcontainers-rs/compare/0.14.0...HEAD
[0.14.0]: https://github.com/testcontainers/testcontainers-rs/compare/0.13...0.14.0
[0.13.0]: https://github.com/testcontainers/testcontainers-rs/compare/0.12.0...0.13
[0.12.0]: https://github.com/testcontainers/testcontainers-rs/compare/0.11.0...0.12.0
[0.11.0]: https://github.com/testcontainers/testcontainers-rs/compare/0.10.0...0.11.0
[0.10.0]: https://github.com/testcontainers/testcontainers-rs/compare/0.9.1...0.10.0
[0.9.1]: https://github.com/testcontainers/testcontainers-rs/compare/0.8.1...0.9.1
107 changes: 0 additions & 107 deletions cliff.toml

This file was deleted.

56 changes: 55 additions & 1 deletion release-plz.toml
Original file line number Diff line number Diff line change
@@ -1,12 +1,66 @@
[workspace]
changelog_config = "cliff.toml" # use a custom git-cliff configuration
git_release_enable = true # enable GitHub releases
pr_labels = ["release"] # add the `release` label to the release Pull Request

[[package]]
name = "testcontainers"
git_tag_name = "{{ version }}"
changelog_path = "CHANGELOG.md"

[[package]]
name = "testimages"
release = false
changelog_update = false

[changelog]
tag_pattern = "[0-9].*"
sort_commits = "oldest"
trim = true
protect_breaking_commits = true
commit_preprocessors = []
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 = "^ci\\(deps\\)", skip = true },
{ message = "^build\\(deps\\)", skip = true },
{ message = "^chore: release", 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" },
]
header = """
# Changelog\n
All notable changes to this project will be documented in this file.
"""
body = """
{%- macro remote_url() -%}
https://github.com/{{ remote.github.owner }}/{{ remote.github.repo }}
{%- endmacro -%}
{% if version -%}
## [{{ version | trim_start_matches(pat="v") }}] - {{ timestamp | date(format="%Y-%m-%d") }}
{% else -%}
## [Unreleased]
{% endif -%}
### Details\
{% for group, commits in commits | group_by(attribute="group") %}
#### {{ group | upper_first }}
{%- for commit in commits %}
- {% if commit.breaking %}[❗] {% endif %}{{ commit.message | upper_first | trim }}\
{% if commit.github.username %} by @{{ commit.github.username }}{%- endif -%}
{% if commit.github.pr_number %} in \
[#{{ commit.github.pr_number }}]({{ self::remote_url() }}/pull/{{ commit.github.pr_number }}) \
{%- endif -%}
{% endfor %}
{% endfor %}
"""

0 comments on commit 849063d

Please sign in to comment.