[package]
name = "qtcloud-devops-cli"
version = "0.10.0"
edition = "2021"
description = "量潮DevOps云命令行工具"
authors = ["QuantTide <opensource@quanttide.com>"]
license = "Apache-2.0"
repository = "https://github.com/quanttide/qtcloud-devops"

[lib]
name = "qtcloud_devops_cli"
path = "src/lib.rs"
# cdylib 仅在 python feature 下需要，但因为 Cargo 不支持条件 crate-type，保留 lib 即可
crate-type = ["lib"]

[[bin]]
name = "qtcloud-devops"
path = "src/main.rs"

[dependencies]
clap = { version = "4", features = ["derive"] }
gix = { version = "0.66", features = ["default", "serde"] }
git2 = "0.19"
quanttide-devops = "0.3.0"
serde = { version = "1", features = ["derive"] }
serde_json = "1"
jiff = "0.1"
thiserror = "2"
semver = "1"
quanttide-agent = "0.1"

pyo3 = { version = "0.23", features = ["extension-module"], optional = true }

[dev-dependencies]
tempfile = "3"

[profile.coverage]
inherits = "test"
debug = 1

[package.metadata.coverage]
rust-toolchain = "stable"
command = "cargo llvm-cov --all-features --lcov --output-path target/coverage/lcov.info"
skip-features = ["python"]

[features]
default = ["cli"]
python = ["dep:pyo3"]
cli = []

[[test]]
name = "code"
path = "tests/code.rs"

[[test]]
name = "release"
path = "tests/release.rs"

[[test]]
name = "cli"
path = "tests/cli.rs"
