-
Notifications
You must be signed in to change notification settings - Fork 13
/
Cargo.toml
240 lines (221 loc) · 7.96 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
[package]
name = "podlet"
version = "0.3.0"
authors = ["Paul Nettleton <[email protected]>"]
edition = "2021"
description = "Generate Podman Quadlet files from a Podman command, compose file, or existing object"
readme = "README.md"
repository = "https://github.com/containers/podlet"
license = "MPL-2.0"
keywords = ["podman", "quadlet", "containers"]
categories = ["command-line-utilities"]
[lints.rust]
unused_crate_dependencies = "warn"
unused_import_braces = "warn"
unused_lifetimes = "warn"
unused_macro_rules = "warn"
unused_qualifications = "warn"
[lints.clippy]
pedantic = { level = "warn", priority = -1 }
cargo = { level = "warn", priority = -1 }
multiple_crate_versions = "allow"
# restriction lint group
clone_on_ref_ptr = "warn"
dbg_macro = "warn"
empty_drop = "warn"
empty_structs_with_brackets = "warn"
exit = "warn"
format_push_string = "warn"
if_then_some_else_none = "warn"
indexing_slicing = "warn"
integer_division = "warn"
mixed_read_write_in_expression = "warn"
mod_module_files = "warn"
multiple_inherent_impl = "warn"
needless_raw_strings = "warn"
panic = "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"
string_slice = "warn"
string_to_string = "warn"
suspicious_xor_used_as_pow = "warn"
tests_outside_test_module = "warn"
todo = "warn"
try_err = "warn"
unimplemented = "warn"
unnecessary_self_imports = "warn"
unreachable = "warn"
unwrap_used = "warn"
verbose_file_reads = "warn"
[dependencies]
clap = { version = "4.2", features = ["derive", "wrap_help"] }
color-eyre = "0.6"
compose_spec = "0.3.0"
indexmap = { version = "2", features = ["serde"] }
ipnet = { version = "2.7", features = ["serde"] }
k8s-openapi = { version = "0.22.0", features = ["latest"] }
path-clean = "1"
serde = { version = "1", features = ["derive"] }
serde_json = "1"
serde_yaml = "0.9.21"
shlex = "1.3"
smart-default = "0.7"
thiserror = "1.0.40"
umask = "2.1.0"
url = "2.3"
[target.'cfg(unix)'.dependencies]
nix = { version = "0.28.0", features = ["user"] }
zbus = "4.0.0"
# The profile that 'cargo dist' will build with
[profile.dist]
inherits = "release"
lto = "thin"
# Config for 'cargo dist'
[workspace.metadata.dist]
# The preferred cargo-dist version to use in CI (Cargo.toml SemVer syntax)
cargo-dist-version = "0.14.1"
# CI backends to support
ci = "github"
# Target platforms to build apps for (Rust target-triple syntax)
targets = [
"aarch64-apple-darwin",
"x86_64-apple-darwin",
"x86_64-unknown-linux-gnu",
"x86_64-unknown-linux-musl",
"x86_64-pc-windows-msvc",
]
# The installers to generate for each app
installers = []
# Publish jobs to run in CI
pr-run-mode = "plan"
# Config for 'git cliff'
# 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 = "containers"
repo = "podlet"
[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 | trim | upper_first }}\
{% if commit.github.username and commit.github.username != "k9withabone" %} by \
[@{{ commit.github.username }}](https://github.com/{{ commit.github.username }})\
{%- endif -%}
{% if commit.github.pr_number %} in \
[#{{ commit.github.pr_number }}]({{ self::remote_url() }}/pull/{{ commit.github.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 -#}
[{{ release.version | trim_start_matches(pat="v") }}]: \
{{ self::remote_url() }}/compare/f9a7aadf5fca4966c3e8c7e6e495749d93029c80...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
# postprocessors
postprocessors = []
[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 -->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 = false
# filter out the commits that are not matched by commit parsers
filter_commits = false
# 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"
# limit the number of commits included in the changelog.
# limit_commits = 42