-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy path.release-plz.toml
More file actions
111 lines (106 loc) · 4.22 KB
/
Copy path.release-plz.toml
File metadata and controls
111 lines (106 loc) · 4.22 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
[workspace]
git_only = true
publish = false
release_always = false
release = false
semver_check = false
dependencies_update = false
changelog_update = false
git_release_enable = false
git_tag_enable = false
git_tag_name = "v{{ version }}"
pr_branch_prefix = "release-plz-"
pr_labels = ["release"]
pr_name = "chore(release): Prepare release"
pr_body = """## Release
{% for release in releases %}
- `{{ release.package }}`: {% if release.previous_version %}`{{ release.previous_version }}` -> {% endif %}`{{ release.next_version }}`
{% endfor %}
Review and edit the release notes in `CHANGELOG.md`.
"""
[changelog]
header = """# Changelog
User-facing changes are listed first. Internal improvements are grouped at the end.
"""
body = """
## [{{ version | trim_start_matches(pat="v") }}]{% if release_link %}({{ release_link }}){% endif %} - {{ timestamp | date(format="%Y-%m-%d") }}
{% set breaking = commits | filter(attribute="breaking", value=true) %}
{% if breaking | length > 0 %}
### Breaking changes
{% for commit in breaking %}
- {% if commit.scope %}**{{ commit.scope }}:** {% endif %}{{ commit.message }}{{ self::pr(commit=commit) }}
{% endfor %}
{% endif %}
{% for group, grouped_commits in commits | group_by(attribute="group") %}
{% if group != "other" and group != "<!-- 6 -->Internal Improvements" %}
{% set visible = grouped_commits | filter(attribute="breaking", value=false) %}
{% if visible | length > 0 %}
### {{ group | striptags | trim | upper_first }}
{% for commit in visible %}
- {% if commit.scope %}**{{ commit.scope }}:** {% endif %}{{ commit.message }}{{ self::pr(commit=commit) }}
{% endfor %}
{% endif %}
{% endif %}
{% endfor %}
{% if remote.contributors %}
### Contributors
{% for contributor in remote.contributors %}
- @{{ contributor.username }}
{% endfor %}
{% endif %}
{% set internal = commits | filter(attribute="group", value="<!-- 6 -->Internal Improvements") | filter(attribute="breaking", value=false) %}
{% if internal | length > 0 %}
<details>
<summary>Internal Improvements</summary>
{% for commit in internal %}
- {% if commit.scope %}**{{ commit.scope }}:** {% endif %}{{ commit.message }}{{ self::pr(commit=commit) }}
{% endfor %}
</details>
{% endif %}
{% macro pr(commit) %}{% if commit.remote.pr_number %} ([#{{ commit.remote.pr_number }}](https://github.com/Firma-AI/openfirma/pull/{{ commit.remote.pr_number }})){% endif %}{% endmacro %}
"""
commit_parsers = [
{ message = '^security(?:\([a-z0-9][a-z0-9._/-]*\))?!?: ', group = "<!-- 0 -->Security" },
{ message = '^feat(?:\([a-z0-9][a-z0-9._/-]*\))?!?: ', group = "<!-- 1 -->Added" },
{ message = '^fix(?:\([a-z0-9][a-z0-9._/-]*\))?!?: ', group = "<!-- 2 -->Fixed" },
{ message = '^perf(?:\([a-z0-9][a-z0-9._/-]*\))?!?: ', group = "<!-- 3 -->Performance" },
{ message = '^revert(?:\([a-z0-9][a-z0-9._/-]*\))?!?: ', group = "<!-- 4 -->Changed" },
{ message = '^docs(?:\([a-z0-9][a-z0-9._/-]*\))?!?: ', group = "<!-- 5 -->Documentation" },
{ message = '^ai(?:\([a-z0-9][a-z0-9._/-]*\))?!?: ', group = "<!-- 6 -->Internal Improvements" },
{ message = '^build(?:\([a-z0-9][a-z0-9._/-]*\))?!?: ', group = "<!-- 6 -->Internal Improvements" },
{ message = '^chore(?:\([a-z0-9][a-z0-9._/-]*\))?!?: ', group = "<!-- 6 -->Internal Improvements" },
{ message = '^ci(?:\([a-z0-9][a-z0-9._/-]*\))?!?: ', group = "<!-- 6 -->Internal Improvements" },
{ message = '^refactor(?:\([a-z0-9][a-z0-9._/-]*\))?!?: ', group = "<!-- 6 -->Internal Improvements" },
{ message = '^style(?:\([a-z0-9][a-z0-9._/-]*\))?!?: ', group = "<!-- 6 -->Internal Improvements" },
{ message = '^test(?:\([a-z0-9][a-z0-9._/-]*\))?!?: ', group = "<!-- 6 -->Internal Improvements" },
{ message = "^.*", skip = true },
]
[[package]]
name = "firma"
release = true
changelog_update = true
changelog_path = "CHANGELOG.md"
changelog_include = [
"firma-audit-schema",
"firma-authority",
"firma-config-loader",
"firma-config-schema",
"firma-core",
"firma-demo-fixture",
"firma-demo-tui",
"firma-fs",
"firma-grpc-interceptor-proto",
"firma-http",
"firma-identifiers",
"firma-process-orchestrator",
"firma-run",
"firma-runtime-state",
"firma-secret-provider",
"firma-sidecar",
"firma-stack",
"firma-test-helpers",
"firma-tui",
"firma-vz-guest-init",
"firma-vz-runner",
]
git_tag_enable = true