From 5a61457f2e4c420ad89f743ef6127649294cf407 Mon Sep 17 00:00:00 2001 From: Ed Page Date: Mon, 17 Apr 2023 11:00:36 -0500 Subject: [PATCH] fix: Allow disabling of vendored packages Fixes #666 --- Cargo.toml | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index c1bfb0788..c1cc3a02e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -43,10 +43,8 @@ pre-release-replacements = [ {file="CHANGELOG.md", search="", replace="\n[Unreleased]: https://github.com/crate-ci/cargo-release/compare/{{tag_name}}...HEAD", exactly=1}, ] -[dependencies] -cargo_metadata = "0.15" -crates-index = "0.19" -# Enabling the features for `crates-index` +[features] +# Enabling `vendored-openssl` for `crates-index` # # crates-index enables git2/https by default, which in turns enable openssl-sys, # openssl-probe and libgit2-sys/https (which also pulls on openssl-sys). @@ -55,7 +53,14 @@ crates-index = "0.19" # version of openssl in additional to vendored-libgit2 so that `cargo-release` # can be built without having to install libgit2 or openssl on the system and # the binary can be run everywhere. -git2 = { version = "0.16.1", features = ["vendored-libgit2", "vendored-openssl"], default-features = false } +default = ["vendored-libgit2", "vendored-openssl"] +vendored-libgit2 = ["git2/vendored-libgit2"] +vendored-openssl = ["git2/vendored-openssl"] + +[dependencies] +cargo_metadata = "0.15" +crates-index = "0.19" +git2 = { version = "0.16.1", default-features = false } toml_edit = "0.19.8" toml = "0.7.3" serde = { version = "1.0", features = ["derive"] }