[package]
name = "mdcat"
description = "cat for markdown: Show markdown documents in terminals"
readme = "README.md"
documentation = "https://docs.rs/mdcat"
keywords = ["markdown", "less", "cat"]
homepage.workspace = true
repository.workspace = true
version.workspace = true
categories.workspace = true
license.workspace = true
authors.workspace = true
edition.workspace = true
rust-version.workspace = true

[dependencies]
anyhow = { version = "1.0.89", default-features = false, features = ["std"] }
clap = { version = "4.5.17", default-features = false, features = ["std", "derive", "help", "usage", "error-context"] }
clap_complete = "4.5.28"
curl = "0.4.47"
mime = { workspace = true}
pulldown-cmark = { workspace = true, features = ['simd'] }
pulldown-cmark-mdcat = { workspace = true, default-features = true }
shell-words = { version = "1.1.0", default-features = false, features = ["std"] }
syntect = { workspace = true, features = ["default-syntaxes"] }
tracing = { workspace = true }
tracing-subscriber = { version = "0.3.18", default-features = false, features = ["env-filter", "std", "fmt", "ansi"] }
url = { workspace = true }

[dev-dependencies]
similar-asserts = { workspace = true }

[target.'cfg(windows)'.dependencies]
anstyle-query = { version = "1.1.0", default-features = false }

[package.metadata.release]
release = true
pre-release-replacements = [
    # Update version and release date in manpage
    { file="mdcat.1.adoc", search="(?m)^:revnumber:.*$", replace = ":revnumber: {{version}}" },
    { file="mdcat.1.adoc", search="(?m)^:revdate:.*$", replace = ":revdate: {{date}}" },
    # Update the changelog
    { file="CHANGELOG.md", search="## \\[Unreleased\\]", replace = "## [Unreleased]\n\n## [{{version}}] – {{date}}", exactly = 1 },
    { file="CHANGELOG.md", search="HEAD", replace = "{{tag_name}}", exactly = 1 },
    { file="CHANGELOG.md", search="\\[Unreleased\\]: ", replace = "[Unreleased]: https://github.com/BIRSAx2/mdcat/compare/{{tag_name}}...HEAD\n[{{version}}]: ", exactly = 1 },
]

[workspace]
members = ["pulldown-cmark-mdcat"]

[workspace.package]
homepage = "https://github.com/swsnr/mdcat"
repository = "https://github.com/swsnr/mdcat"
version = "2.9.0"
categories = ["command-line-utilities", "text-processing"]
license = "MPL-2.0 AND Apache-2.0"
authors = ["Sebastian Wiesner <sebastian@swsnr.de>"]
edition = "2021"
rust-version = "1.83"

[workspace.dependencies]
mime = { version = "0.3.17", default-features = false }
pulldown-cmark = { version = "0.12.1", default-features = false }
similar-asserts = "1.6.0"
syntect = { version = "5.2.0", default-features = false, features = ["regex-fancy"] }
tracing = { version = "0.1.40", default-features = false, features = ["attributes"]  }
insta = { version = "1.40.0", features = ["glob", "filters"] }
url = "2.5.2"

# Our own crates; pinned to an exact version because we release all of this repo
# in a single version. cargo release takes care of updating these.
pulldown-cmark-mdcat = { version = "=2.9.0", path = "pulldown-cmark-mdcat", default-features = false }

[workspace.metadata.release]
allow-branch = ["main"]
pre-release-commit-message = "Release {{version}}"
tag-prefix = "mdcat-"
tag-name = "{{prefix}}{{version}}"
tag-message = "mdcat {{version}}"
sign-tag = true
# Github CI does this for us.
verify = false
