forked from bosun-ai/swiftide
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrelease-plz.toml
121 lines (107 loc) · 3.68 KB
/
release-plz.toml
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
112
113
114
115
116
117
118
119
120
121
[workspace]
changelog_path = "./CHANGELOG.md"
#changelog_config = "cliff.toml"
git_tag_name = "v{{ version }}"
changelog_update = false
git_tag_enable = false
git_release_enable = false
repo_url = "https://github.com/bosun-ai/swiftide"
[[package]]
# Only release the main package on github
name = "swiftide"
git_tag_name = "v{{ version }}"
git_tag_enable = true
git_release_enable = true
changelog_include = [
"swiftide-core",
"swiftide-indexing",
"swiftide-integrations",
"swiftide-query",
"swiftide-test-utils",
"swiftide-agents",
"swiftide-macros",
]
changelog_update = true
[changelog]
commit_parsers = [
{ message = "^feat*", group = "<!-- 0 -->New features" },
{ message = "^fix*", group = "<!-- 1 -->Bug fixes" },
{ message = "^perf*", group = "<!-- 2 -->Performance" },
{ message = "^chore*", group = "<!-- 3 -->Miscellaneous" },
{ message = "^refactor*", group = "<!-- 3 -->Miscellaneous" },
]
# changelog header
header = """
# Changelog
All notable changes to this project will be documented in this file.
"""
body = """
{%- if not version %}
## [unreleased]
{% else -%}
## [{{ version }}]({{ release_link }}) - {{ timestamp | date(format="%Y-%m-%d") }}
{% endif -%}
{% macro commit(commit) -%}
{% if commit.id -%}
- [{{ commit.id | truncate(length=7, end="") }}]({{ "https://github.com/bosun-ai/swiftide/commit/" ~ commit.id }}) \
{% endif -%}
{% if commit.scope %}*({{commit.scope | default(value = "uncategorized") | lower }})* {% endif %}\
{%- if commit.breaking %} [**breaking**]{% endif %} \
{{ commit.message | upper_first | trim }}\
{%- if commit.links %} \
in {% for link in commit.links %}[{{link.text}}]({{link.href}}) {% endfor -%}\
{% endif %}
{%- if commit.body %}
````text {#- 4 backticks escape any backticks in body #}
{{commit.body | indent(prefix=" ") }}
````
{%- endif %}
{%- if commit.breaking_description %}
**BREAKING CHANGE**: {{ commit.breaking_description }}
{%- endif %}
{% endmacro -%}
{% for group, commits in commits | group_by(attribute="group") %}
### {{ group | striptags | trim | upper_first }}
{% for commit in commits | filter(attribute="scope") | sort(attribute="scope") %}
{{ self::commit(commit=commit) }}
{%- endfor -%}
{% for commit in commits %}
{%- if not commit.scope %}
{{ self::commit(commit=commit) }}
{%- endif -%}
{%- endfor -%}
{%- endfor %}
{%- if github.contributors -%}
{% if github.contributors | filter(attribute="is_first_time", value=true) | length != 0 %}
### New Contributors
{%- endif %}\
{% for contributor in github.contributors | filter(attribute="is_first_time", value=true) %}
* @{{ contributor.username }} made their first contribution
{%- if contributor.pr_number %} in \
[#{{ contributor.pr_number }}]({{ self::remote_url() }}/pull/{{ contributor.pr_number }}) \
{%- endif %}
{%- endfor -%}
{% endif -%}
{% if version %}
{% if previous.version %}
**Full Changelog**: {{ self::remote_url() }}/compare/{{ previous.version }}...{{ version }}
{% endif %}
{% else -%}
{% raw %}\n{% endraw %}
{% endif %}
{%- macro remote_url() -%}
{%- if remote.github -%}
https://github.com/{{ remote.github.owner }}/{{ remote.github.repo }}\
{% else -%}
https://github.com/bosun-ai/swiftide
{%- endif -%}
{% endmacro %}
""" # template for the changelog body
# https://keats.github.io/tera/docs/#introduction
# note that the - before / after the % controls whether whitespace is rendered between each line.
# Getting this right so that the markdown renders with the correct number of lines between headings
# code fences and list items is pretty finicky. Note also that the 4 backticks in the commit macro
# is intentional as this escapes any backticks in the commit body.
# remove the leading and trailing whitespace from the template
trim = false
# changelog footer