-
Notifications
You must be signed in to change notification settings - Fork 0
/
Cargo.toml
256 lines (236 loc) · 8.34 KB
/
Cargo.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
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
[workspace]
members = ["compose_spec_macros"]
resolver = "2"
[workspace.package]
authors = ["Paul Nettleton <k9@k9withabone.dev>"]
edition = "2021"
license = "MPL-2.0"
readme = "README.md"
repository = "https://github.com/k9withabone/compose_spec_rs"
rust-version = "1.70"
[workspace.lints.rust]
missing_copy_implementations = "warn"
missing_debug_implementations = "warn"
missing_docs = "warn"
unreachable_pub = "warn"
unstable_features = "deny"
unused_crate_dependencies = "warn"
unused_import_braces = "warn"
unused_lifetimes = "warn"
unused_macro_rules = "warn"
unused_qualifications = "warn"
variant_size_differences = "warn"
[workspace.lints.clippy]
pedantic = { level = "warn", priority = -1 }
cargo = { level = "warn", priority = -1 }
nursery = { level = "warn", priority = -1 }
# conflicts with `unreachable_pub`
redundant_pub_crate = "allow"
# restriction lint group
absolute_paths = "warn"
as_conversions = "warn"
assertions_on_result_states = "warn"
clone_on_ref_ptr = "warn"
dbg_macro = "warn"
decimal_literal_representation = "warn"
default_numeric_fallback = "warn"
deref_by_slicing = "warn"
empty_drop = "warn"
empty_enum_variants_with_brackets = "warn"
empty_structs_with_brackets = "warn"
error_impl_error = "warn"
exit = "deny"
format_push_string = "warn"
get_unwrap = "warn"
if_then_some_else_none = "warn"
indexing_slicing = "warn"
infinite_loop = "warn"
integer_division = "warn"
large_include_file = "warn"
map_err_ignore = "warn"
mem_forget = "warn"
min_ident_chars = "warn"
missing_docs_in_private_items = "warn"
mixed_read_write_in_expression = "warn"
mod_module_files = "warn"
multiple_inherent_impl = "warn"
needless_raw_strings = "warn"
panic = "warn"
partial_pub_fields = "warn"
print_stderr = "warn"
print_stdout = "warn"
pub_without_shorthand = "warn"
rc_buffer = "warn"
rc_mutex = "warn"
redundant_type_annotations = "warn"
rest_pat_in_fully_bound_structs = "warn"
same_name_method = "warn"
semicolon_outside_block = "warn"
str_to_string = "warn"
string_add = "warn"
string_lit_chars_any = "warn"
string_slice = "warn"
string_to_string = "warn"
suspicious_xor_used_as_pow = "warn"
tests_outside_test_module = "warn"
todo = "warn"
try_err = "warn"
undocumented_unsafe_blocks = "warn"
unimplemented = "warn"
unnecessary_safety_comment = "warn"
unnecessary_safety_doc = "warn"
unnecessary_self_imports = "warn"
unreachable = "warn"
unwrap_used = "warn"
use_debug = "warn"
[workspace.dependencies]
compose_spec_macros = { version = "=0.1.1", path = "compose_spec_macros" }
serde = "1.0.147"
serde_yaml = "0.9"
# git-cliff ~ configuration
# Run with `GITHUB_TOKEN=$(gh auth token) git cliff --bump -up CHANGELOG.md`
# https://git-cliff.org/docs/configuration
[workspace.metadata.git-cliff.bump]
features_always_bump_minor = false
breaking_always_bump_major = false
[workspace.metadata.git-cliff.remote.github]
owner = "k9withabone"
repo = "compose_spec_rs"
[workspace.metadata.git-cliff.changelog]
# changelog header
header = """
# Changelog\n
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).\n
"""
# template for the changelog body
# https://keats.github.io/tera/docs/#introduction
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 -%}
{% for group, commits in commits | group_by(attribute="group") %}
### {{ group | striptags | trim | upper_first }}
{%- for commit in commits %}
- {% if commit.breaking %}**BREAKING** {% endif -%}
{% if commit.scope %}*({{ commit.scope }})* {% endif -%}
{{ commit.message | upper_first | trim }}\
{% if commit.remote.username and commit.remote.username != remote.github.owner %} by \
[@{{ commit.remote.username }}](https://github.com/{{ commit.remote.username }})\
{%- endif -%}
{% if commit.remote.pr_number %} in \
[#{{ commit.remote.pr_number }}]({{ self::remote_url() }}/pull/{{ commit.remote.pr_number }})\
{%- endif -%}.
{%- set fixes = commit.footers | filter(attribute="token", value="Fixes") -%}
{%- set closes = commit.footers | filter(attribute="token", value="Closes") -%}
{% for footer in fixes | concat(with=closes) -%}
{%- set issue_number = footer.value | trim_start_matches(pat="#") %} \
([{{ footer.value }}]({{ self::remote_url() }}/issues/{{ issue_number }}))\
{%- endfor -%}
{% if commit.body %}
{%- for section in commit.body | trim | split(pat="\n\n") %}
{% raw %} {% endraw %}- {{ section | replace(from="\n", to=" ") }}
{%- endfor -%}
{%- endif -%}
{% endfor %}
{% endfor %}
{%- 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 %}\n
"""
# template for the changelog footer
footer = """
{%- macro remote_url() -%}
https://github.com/{{ remote.github.owner }}/{{ remote.github.repo }}
{%- endmacro -%}
{% for release in releases -%}
{% if release.version -%}
{% if release.previous.version -%}
[{{ release.version | trim_start_matches(pat="v") }}]: \
{{ self::remote_url() }}/compare/{{ release.previous.version }}...{{ release.version }}
{%- else %}
{#- compare against the initial commit for the first version #}
[0.1.0]: {{ self::remote_url() }}/compare/51a31d82c34c13cf8881bf8a9cbda74a6b6aa9b6...v0.1.0
{%- endif -%}
{% else -%}
[Unreleased]: {{ self::remote_url() }}/compare/{{ release.previous.version }}...HEAD
{% endif -%}
{%- endfor -%}
"""
# remove the leading and trailing whitespace from the templates
trim = true
[workspace.metadata.git-cliff.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 = []
# regex for parsing and grouping commits
commit_parsers = [
{ message = "^feat", group = "<!-- 0 -->New Features" },
{ body = ".*security", group = "<!-- 1 -->Security" },
{ message = "^fix", group = "<!-- 2 -->Bug Fixes" },
{ message = "^perf", group = "<!-- 3 -->Performance" },
{ message = "^doc", group = "<!-- 4 -->Documentation" },
{ message = "^test", group = "<!-- 5 -->Tests" },
{ message = "^refactor", group = "<!-- 6 -->Refactor" },
{ message = "^style", group = "<!-- 7 -->Style" },
{ message = "^chore", group = "<!-- 8 -->Miscellaneous" },
{ message = "^ci", default_scope = "ci", group = "<!-- 8 -->Miscellaneous" },
{ message = "^release", skip = true },
]
# protect breaking changes from being skipped due to matching a skipping commit_parser
protect_breaking_commits = true
# filter out the commits that are not matched by commit parsers
filter_commits = true
# regex for matching git tags
tag_pattern = "v[0-9].*"
# regex for skipping tags
skip_tags = "v0.1.0-beta.1"
# 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"
[package]
name = "compose_spec"
version = "0.3.0"
authors.workspace = true
edition.workspace = true
license.workspace = true
readme.workspace = true
repository.workspace = true
rust-version.workspace = true
description = "Types for (de)serializing from/to the compose-spec"
keywords = ["compose", "containers", "docker", "podman"]
categories = ["api-bindings"]
[lints]
workspace = true
[dependencies]
compose_spec_macros.workspace = true
indexmap = { version = "2.2.3", features = ["serde"] }
ipnet = { version = "2", features = ["serde"] }
itoa = "1"
serde = { workspace = true, features = ["derive"] }
serde_yaml.workspace = true
thiserror = "1.0.28"
url = { version = "2.3", features = ["serde"] }
[dev-dependencies]
pomsky-macro = "0.11"
proptest = "1.3.1"