[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 = "warn"
cargo = "warn"
nursery = { level = "warn", priority = -1 }
redundant_pub_crate = "allow"
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.0", path = "compose_spec_macros" }
serde = "1.0.147"
serde_yaml = "0.9"
[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]
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
"""
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.github.username and commit.github.username != remote.github.owner %} 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
"""
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 }}
{% endif -%}
{% else -%}
[Unreleased]: {{ self::remote_url() }}/compare/{{ release.previous.version }}...HEAD
{% endif -%}
{%- endfor -%}
{#- compare against the initial commit for the first version -#}
[0.1.0]: {{ self::remote_url() }}/compare/51a31d82c34c13cf8881bf8a9cbda74a6b6aa9b6...v0.1.0
"""
trim = true
[workspace.metadata.git-cliff.git]
conventional_commits = true
filter_unconventional = true
split_commits = false
commit_preprocessors = []
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_commits = true
filter_commits = true
tag_pattern = "v[0-9].*"
skip_tags = "v0.1.0-beta.1"
ignore_tags = ""
topo_order = false
sort_commits = "oldest"
[package]
name = "compose_spec"
version = "0.2.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"